![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Create css bundles from npm packages using the browserify dependency graph.
Many thanks to James Halliday for his help and guidance in bringing this module into reality.
├── node_modules
│ └── my-module
│ ├── index.js
│ ├── myModule.css
│ └── package.json
└── main.js
In my-module's package.json
, the module's style assets just need to be enumerated (glob notation):
{
"name" : "my-module",
"version": "1.5.0",
"style" : "*.css"
}
In main.js
, everything looks the same:
myModule = require( 'my-module' );
console.log( 'hello world' );
After parcelify is run from the command line,
$ parcelify main.js -c bundle.css
Now bundle.css
has all the css in the modules on which main.js
depends (in this case myModule.css
).
$ npm install -g parcelify
--cssBundle, -c Path of the css bundle.
--watch, -w Watch mode - automatically rebuild bundles as appropriate for changes.
--jsBundle, -j Path of the optional JavaScript bundle (i.e. browserify's output).
--debug, -d Enable source maps that allow you to debug your js files separately.
(Passed through to browserify.)
--help, -h Show this message
Two keys are special cased in package.json files.
style
key is a glob or array of globs that enumerates the style assets of the module.tranforms
key is an array of names or file paths of transform modules to be applied to assets.{
"name": "my-module",
"description": "Example package.json for hypothetical myModule.",
"version": "1.5.0",
"style" : "*.scss",
"transforms" : [ "sass-css-stream" ],
"devDependencies" : {
"sass-css-stream": "0.0.1"
}
}
mainPath
is the path of the JavaScript entry point file. options are as follows:
{
bundles : {
style : 'bundle.css', // path of css bundle
script : 'bundle.js', // path of javascript bundle (not output if omitted)
},
browserifyInstance : undefined // use your own instance of browserify / watchify
browserifyBundleOptions : {} // passed through to browserify.bundle()
watch : false,
}
A parcelify object is returned, which is an event emitter.
Called when the css bundle has been output.
Called when a error occurs.
Called when a new package is created. package
is a package object as defined in lib/package.js. isMain
is true iff the package corresponds to the entry point mainPath
.
Called when a style asset is updated in watch mode. eventType
is 'added'
, 'changed'
, or 'deleted'
, and asset
is an asset object as defined in lib/asset.js.
Parcelify can compile template bundles in the exact same was as css bundles using the -t
option on the command line and the template
key in package.json. However, for maximum encapsulation and inter-package compatibility we recommend using a browserify transform like node-hbsfy to precompile templates and require
them explicitly.
MIT
FAQs
Create css bundles from npm packages using the browserify dependency graph.
The npm package parcelify receives a total of 37 weekly downloads. As such, parcelify popularity was classified as not popular.
We found that parcelify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.