Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

precompile files are not included in npm package #250

Closed
lukewestby opened this issue Jul 25, 2016 · 5 comments
Closed

precompile files are not included in npm package #250

lukewestby opened this issue Jul 25, 2016 · 5 comments

Comments

@lukewestby
Copy link
Contributor

lukewestby commented Jul 25, 2016

What I'm trying to do

Install the tungstenjs and use the tungsten_template webpack loader from within the tungstenjs installation, as outlined in the project's documentation.

Expected result

Webpack is able to look up tungsten_template from the node_modules/tungstenjs/precompile directory

Actual result

The precompile directory is not present in the installation's directory. Only dist is available below the top level.

Steps to reproduce

$ mkdir tungsten-install-test && cd tungsten-install-test
$ npm init --yes
$ npm install --save tungstenjs
$ ls node_modules/tungstenjs

Something that stands out in the installed package.json within tungsten's install directory is that the files property looks like

{
  // ...
  "files": [
    "dist"
  ],
  // ...
}

but I can't seem to figure out what configuration is causing this. Please let me know if more information is needed!

@ndreckshage
Copy link

This fixes #251 - tested on scoped npm module (@ndreckshage/tungstenjs)

@andrewrota
Copy link
Contributor

Would the template compiler APIs exposed here work? I use precompiler as a webpack template loader in my boilerplate tungsten apps.

The published npm package is intentionally only the dist files to prevent deep-linking into the repo when consuming the library (also since including a non-compiled build would require consuming libraries to use the same versions of loaders like babel). Custom builds can be done by cloning the repo and installing its dev dependencies.

If there's something we're not exposing that is necessary to consume tungsten then the best way to handle that would be to expose it on the tungsten API itself.

And yes, I know all of this should be updated in our docs. I'm hoping to do a significant update of the readme soon.

@lukewestby
Copy link
Contributor Author

Perfect! I can submit a PR to update the docs if you'd like.

@andrewrota
Copy link
Contributor

That'd be awesome. I'm unable to do much until next week but I can spend some time on them then.

lukewestby pushed a commit to lukewestby/tungstenjs that referenced this issue Jul 30, 2016
@artemruts
Copy link
Contributor

Closing, looks like primary problem was addressed with #255.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants