Skip to content

Instantly share code, notes, and snippets.

@derrickwilliams
Created April 22, 2017 22:52
Show Gist options
  • Select an option

  • Save derrickwilliams/cc536243a8df4dcdfbe2fa2f2f725d19 to your computer and use it in GitHub Desktop.

Select an option

Save derrickwilliams/cc536243a8df4dcdfbe2fa2f2f725d19 to your computer and use it in GitHub Desktop.
{
"presets": ["env"],
"plugins": ["external-helpers"]
}
mkdir -p src/lib && touch src/lib/index.js
# update (included) package.json
# include rollup.config.js & .babelrc files
# install dependencies
yarn add
# build command
npm run build
{
"name": "WILL*DEFINITELY*NEED*A*NEW*NAME",
"version": "0.0.1",
"description": "IT DESERVES A GOOD DESCRIPTION",
"main": "lib/bundle.js",
"repository": "[email protected]:***super-awesome***",
"author": "Derrick W <[email protected]> (I'll take the credit if don't want to update",
"scripts": {
"build": "./node_modules/.bin/rollup -c"
},
"license": "MIT",
"license": "MIT",
"dependencies": {},
"devDependencies": {
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^4.2.2",
"rollup": "^0.41.6",
"rollup-plugin-babel": "^2.7.1",
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-env": "^1.4.0",
"babel-preset-latest": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"istanbul": "^0.4.5",
"jasmine": "^2.5.3",
"proxyquire": "^1.7.11",
"supertest": "^3.0.0"
}
}
// rollup.config.js
export default {
entry: 'src/lib/index.js',
format: 'umd',
dest: 'lib/bundle.js'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment