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
add project setup && build + deploy and release tasks #1
Conversation
… created with build scripts)
Ok, I tested the pull request and it's not exactly what I was looking for. Maybe i'm still old on how all this things works, I adopted es2015 classes, functions and everything else but not used es6 module and commonjs. I don't have any problem that all this things comes as something extra but not changing the way library already works. I want to be able to include the js file at the end of the body and everything should work in mostly all browsers. I run "npm i" and "npm run build" and the files were generated but I couldn't: What I want to ask is that if we can achieve all this es6 module and commonjs but without changing the way it already works? Thanks for your work |
I wrote the code using es2015 features that are not working on old browsers and my ideal output of all this build / npm would be something like this: When I run npm build i want to generate 4 files:
They can be a es6 module or common js module if they work exactly the same as specified and module if anyone wants. Can this be achieved? |
@micku7zu of course. the lib folder is supposed to be published to npm - not to use in a script tag but installed with npm install vanilla-tilt. then you can require it as a module und use it in your web project. |
Ok, thanks! I will wait to see the outcome 😃 |
@micku7zu just committed. as i see there are 2 conflicts in the main file. i will check.. ps before bundling you need to run npm i again. dependencies have changed |
there you go :) |
I tested it in a hurry and it seems that it is ok. I still have some more questions:
I still need to see what yarn.lock, .editorconfig and .gitattributes do... Thanks again for your work. It's late here and I will have a closer look tomorrow 😄 |
So, I saw that minify works and dist/ is exactly as I wanted. Thanks I read about yarn.lock, .editorconfig and .gitattributes, they are all ok. I merged the changes with small adjustments:
Thanks again, great work! |
i added a complete setup and package.json to organize the project better. the scripts enable to build the code for publishing to npm as es2015 and commonjs modules. also a browser compatible version is build.
take a look at the scripts in package.json
you can build the project - release a version to npm and deploy the demo to github pages automatically
just call
npm i
oryarn install
and then(yarn / npm) run build