0.0.0 • Published 5 years ago
atomico-facebook v0.0.0
rollup modern app
This configuration assumes that the developer works with a modern browser, compatible with mjs modules and dynamic import import("...")
, additionally offers optional support to Typescript
If your browser does not support dynamic import, consider using as polyfill Shimport.
this configuration has been generated by
npm init @atomico
Script
# development mode
npm run dev
# production mode
npm run build
Directory
/src
index.js #entry code
/test
/public #single-app
/dist #this directory is removed with each rollup cycle
/img
index.html
manifest.json
sw-pwa.js #pwa service worker
package.json
By default, rollup loads the initial configuration from package.json:
{
"input": "src/index.js", # define the input file for rollup
"output": "public/dist", # define the output directory
}
support
CSS
The css is supported by the plugin rollup-plugin-postcss, this librarian allows to extract the css from the
// inline inject css
import "style.js";
// get string css
import css from "style.css";
JS Y TS
supported by rollup-plugin-sucrase, this library allows manipulation of non-standardized JS and TS code.
test
The test stack is based on karma, jasmine and chrome, check the /test
folder this has a small example of use
0.0.0
5 years ago