Skip to content

Instantly share code, notes, and snippets.

@Rich-Harris
Created January 24, 2016 13:40
Show Gist options
  • Save Rich-Harris/160a65c5c8ce6feb7337 to your computer and use it in GitHub Desktop.
Save Rich-Harris/160a65c5c8ce6feb7337 to your computer and use it in GitHub Desktop.
attempt to reproduce SO 34973542
import SHA256 from 'crypto-js/sha256';
console.log( SHA256( 'hello' ) );
{
"devDependencies": {
"rollup": "^0.25.1",
"rollup-plugin-commonjs": "^2.2.0",
"rollup-plugin-npm": "^1.3.0"
},
"scripts": {
"build": "rollup -c",
"pretest": "npm run build",
"test": "node bundle.js"
},
"dependencies": {
"crypto-js": "^3.1.6"
}
}
import npm from 'rollup-plugin-npm';
import commonjs from 'rollup-plugin-commonjs';
export default {
entry: 'main.js',
format: 'cjs',
plugins: [
npm({
jsnext: true,
main: true,
}),
commonjs()
],
dest: 'bundle.js',
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment