Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM build doesn't include non .js files #317

Closed
1 of 4 tasks
cnolimit opened this issue Jun 1, 2017 · 2 comments
Closed
1 of 4 tasks

NPM build doesn't include non .js files #317

cnolimit opened this issue Jun 1, 2017 · 2 comments

Comments

@cnolimit
Copy link

cnolimit commented Jun 1, 2017

This issue is a:

  • Bug report
  • Feature request
  • Question / support request
  • Other
node -v : 8.0.0
npm -v 5.0.0

Each time i create a build, the /es and /lib folders both fail to include any files which don't have a .js extension.
I don't no if i'm missing something, but i've read the docs and still can't seem to understand the behaviour and whether it is intended.

Is there a way to include the .svg and .json files i have in seperate folders, over to the /es and /lib folders

This is my setup

src/
   assets/
      *only .svg files*
   components/
      *only .js files inside*
   utilities/
      *only .js files inside*
   lib/
      *only .json files*
   index.js

This is what ends up in the es/ and /lib folders

src/
   components/
      *only .js files inside*
   utilities/
      *only .js files inside*
   index.js
@insin
Copy link
Owner

insin commented Jun 1, 2017

Pass a --copy-files flag in your build script:

If you have non-JavaScript files in src/ which you want to be copied over when building, such as CSS files, pass a --copy-files flag.

@cnolimit
Copy link
Author

cnolimit commented Jun 1, 2017

That worked Great! thanks for the help @insin 👍

@insin insin closed this as completed in 527dab1 Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants