๐ Tasty little compiler util. Supports most modern JS syntax, as well as compiles and extracts CSS (or SCSS) by default.
npm i @friendsof/spaghetti -g # or --save-dev for npm scriptsspaghetti [options] <in> <outDir>Watch files for changes.
spaghetti src/index.js dist/ -wSpecify a JSX pragma (default: React.createElement)
spaghetti src/index.js dist/ --jsx preact.hAny source map value supported by webpack (default: source-map)
spaghetti src/index.js dist/ --map cheap-module-source-mapUse sass instead of postcss
spaghetti src/index.js dist/ --sassSpecify a config file (default: spaghetti.config.js)
spaghetti src/index.js dist/ --config config.jsConfig files support the same options as above, along with a couple additions.
// spaghetti.config.js
module.exports = {
in: 'src/index.js',
outDir: 'dist',
jsx: 'h',
sass: false, // set to true for sass
reload: true, // reloads on watch
alias: {
components: 'src/components/'
},
banner: '/** Hello there */'
}MIT License ยฉ The Couch