npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@friendsof/spaghetti

1.2.2 • Public • Published

@friendsof/spaghetti

🍝 Tasty little compiler util. Supports most modern JS syntax, as well as compiles and extracts CSS (or SCSS) by default.

Install

npm i @friendsof/spaghetti -g # or --save-dev for npm scripts 

Usage

spaghetti [options] <in> <outDir>

Options

-w, --watch

Watch files for changes.

spaghetti src/index.js dist/ -w

--jsx

Specify a JSX pragma (default: React.createElement)

spaghetti src/index.js dist/ --jsx preact.h

--map

Any source map value supported by webpack (default: source-map)

spaghetti src/index.js dist/ --map cheap-module-source-map

--sass

Use sass instead of postcss

spaghetti src/index.js dist/ --sass

--config

Specify a config file (default: spaghetti.config.js)

spaghetti src/index.js dist/ --config config.js

Config

Config 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',
  alias: {
    components: 'src/components/'
  },
  banner: '/** Hello there */'
}

License

MIT License © Friends of Friends

Keywords

none

install

npm i @friendsof/spaghetti

Downloadsweekly downloads

146

version

1.2.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability