{"id":20809561,"url":"https://github.com/resisttheurge/babel-webpack-package-boilerplate","last_synced_at":"2025-05-07T08:05:50.914Z","repository":{"id":57200979,"uuid":"50753506","full_name":"resisttheurge/babel-webpack-package-boilerplate","owner":"resisttheurge","description":"boilerplate for building an npm package using webpack, with next-gen javascript transpilation through babel","archived":false,"fork":false,"pushed_at":"2017-02-20T18:19:02.000Z","size":9,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-10T23:10:00.989Z","etag":null,"topics":["babel","babel-webpack","boilerplate","es2015","es2016","es2017","es6","node","webpack","webpack-boilerplate","webpack-configuration"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resisttheurge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-31T01:25:26.000Z","updated_at":"2022-08-18T19:32:52.000Z","dependencies_parsed_at":"2022-09-15T11:21:53.548Z","dependency_job_id":null,"html_url":"https://github.com/resisttheurge/babel-webpack-package-boilerplate","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resisttheurge%2Fbabel-webpack-package-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resisttheurge%2Fbabel-webpack-package-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resisttheurge%2Fbabel-webpack-package-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resisttheurge%2Fbabel-webpack-package-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resisttheurge","download_url":"https://codeload.github.com/resisttheurge/babel-webpack-package-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224850182,"owners_count":17380129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","babel-webpack","boilerplate","es2015","es2016","es2017","es6","node","webpack","webpack-boilerplate","webpack-configuration"],"created_at":"2024-11-17T20:14:26.574Z","updated_at":"2024-11-17T20:14:27.107Z","avatar_url":"https://github.com/resisttheurge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"babel-webpack-package-boilerplate\n=================================\n\n**Now updated for webpack 2!**\n\nThis project is meant to show how easy and useful it can be to use [webpack] as\na tool-chain for npm packages.\n\nFun things in this project:\n  - Source code and tests for the package are written with [es2015+] and\n    [stage-0] features (specifically the features supported by the [env] and\n    [stage-0] presets for [babel]).\n    See any `*.js` files in `src` for examples. See `.babelrc` for\n    the babel configuration, and `config/rules.js` to see how babel was\n    integrated into webpack.\n  - Platform-specific polyfills and transpilation. Use of the [env] preset for\n    [babel] allows webpack to avoid unused polyfills and source code transforms\n    if the target platform supports them. See `.babelrc` to see how the preset\n    was configured to support this.\n  - Tree-shaking transpilation through webpack 2 and [es2015+] modules. Due to the\n    statically-analyzable module system provided by next-generation JavaScript, webpack can remove unused code and dependencies at transpiletime, resulting in smaller built artifacts.\n  - Modules in `lib` directories can be loaded universally, like modules found\n    in `node_modules`. See `src/main.js` and `src/test/index.js` for examples.\n    See `modules` in `config/resolve.js` to see how this was configured.\n  - Modules in `src` that end with `*test.js` and modules that are direct\n    children of `test` directories can be run as [mocha] test modules, which will\n    automatically be processed using webpack.\n\nGetting Started\n---------------\n\nClone the repository and install dependencies with `npm`.\n```bash\n$ git clone https://github.com/resisttheurge/babel-webpack-package-boilerplate.git\n$ cd babel-webpack-package-boilerplate\n$ npm install\n```\n\nBuilding\n--------\nThe `build` script defined in the `package.json` file uses webpack to transpile\nsources in the `src` directory. The successfully transpiled sources\nare placed in the `dist` folder. This folder is preserved by npm, but ignored\nby git.\n\n```bash\n$ npm run build\n```\n\n`Watch`-style building is supported by the `build:watch` script.\n\n```bash\n$ npm run build:watch\n```\n\nThe `prestart`, and `prepublish` scripts defined in the\n`package.json` file reference the `build` script, so there's no need to run\nthe build script manually in those situations.\n\nRunning\n-------\n\nRun the project with `npm start`.\n\n```bash\n$ npm start\n\n  hello, world!\n```\n\nAs said before, this will automatically run the build script first.\n\nTesting\n-------\n\nTest the project with `npm test`.\n\n```bash\n$ npm test\n```\n\n`Watch`-style testing is supported by the `test:watch` script.\n\n```bash\n$ npm run test:watch\n```\n\nPublishing\n----------\n\nPublish the project on the local machine (for testing) with `npm install`.\n\n```bash\n$ npm install . -g\n$ babel-webpack-package-boilerplate\n\n  hello, world!\n```\n\nPublish the package globally with `npm publish`.\n\n```bash\n$ npm publish\n$ npm install -g babel-webpack-package-boilerplate\n$ babel-webpack-package-boilerplate\n\n  hello, world!\n```\n\nIn both cases, again, this will automatically run the build script after installation.\n\n[webpack]:https://webpack.github.io/\n[es2015+]:http://www.ecma-international.org/ecma-262/6.0/\n[stage-0]:https://github.com/tc39/ecma262/blob/master/stage0.md\n[babel]:https://babeljs.io/\n[babel-preset-env]:https://babeljs.io/docs/plugins/preset-env/\n[babel-preset-stage-0]:https://babeljs.io/docs/plugins/preset-stage-0/\n[mocha]:https://mochajs.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresisttheurge%2Fbabel-webpack-package-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresisttheurge%2Fbabel-webpack-package-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresisttheurge%2Fbabel-webpack-package-boilerplate/lists"}