{"id":22404649,"url":"https://github.com/xlsdg/webpack2-library-starter","last_synced_at":"2026-05-05T21:38:58.374Z","repository":{"id":79205302,"uuid":"81275586","full_name":"xlsdg/webpack2-library-starter","owner":"xlsdg","description":"Webpack2 based boilerplate for producing libraries (Input: ES6, Output: universal library)","archived":false,"fork":false,"pushed_at":"2017-04-25T03:23:00.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-01T06:42:29.167Z","etag":null,"topics":["es6","eslint","library-starter","umd-modules","webpack2"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xlsdg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-08T01:54:38.000Z","updated_at":"2017-02-08T02:12:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"ccf3d683-be3e-4a5a-8b8f-03170a0657dc","html_url":"https://github.com/xlsdg/webpack2-library-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlsdg%2Fwebpack2-library-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlsdg%2Fwebpack2-library-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlsdg%2Fwebpack2-library-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xlsdg%2Fwebpack2-library-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xlsdg","download_url":"https://codeload.github.com/xlsdg/webpack2-library-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761303,"owners_count":20667895,"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":["es6","eslint","library-starter","umd-modules","webpack2"],"created_at":"2024-12-05T10:14:18.945Z","updated_at":"2026-05-05T21:38:53.338Z","avatar_url":"https://github.com/xlsdg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack2 library starter\n\n\u003e Webpack2 based boilerplate for producing libraries (Input: ES6, Output: universal library)\n\nForked from [webpack-library-starter](https://github.com/krasimir/webpack-library-starter).\n\n## Features\n\n* Webpack2 based.\n* ES6 as a source.\n* Exports in a [umd](https://github.com/umdjs/umd) format so your library works everywhere.\n* ES6 test setup with [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/).\n* Linting with [ESLint](http://eslint.org/).\n\n## Process\n\n```\nES6 source files\n       |\n       |\n    webpack\n       |\n       +--- babel, eslint\n       |\n  ready to use\n     library\n  in umd format\n```\n\n*Have in mind that you have to build your library before publishing. The files under the `lib` folder are the ones that should be distributed.*\n\n## Getting started\n\n1. Setting up the name of your library\n  * Open `webpack.config.js` file and change the value of `libraryName` variable.\n  * Open `package.json` file and change the value of `main` property so it matches the name of your library.\n2. Build your library\n  * Run `npm install` to get the project's dependencies\n  * Run `npm run build` to produce minified version of your library.\n3. Development mode\n  * Having all the dependencies installed run `npm run dev`. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.\n4. Running the tests\n  * Run `npm run test`\n\n## Scripts\n\n* `npm run build` - produces production version of your library under the `lib` folder\n* `npm run dev` - produces development version of your library and runs a watcher\n* `npm run test` - well ... it runs the tests :)\n\n## Readings\n\n* [Start your own JavaScript library using webpack and ES6](http://krasimirtsonev.com/blog/article/javascript-library-starter-using-webpack-es6)\n\n## Misc\n\n### An example of using dependencies that shouldn’t be resolved by webpack, but should become dependencies of the resulting bundle\n\nIn the following example we are excluding React and Lodash:\n\n```js\n{\n  devtool: 'source-map',\n  output: {\n    path: '...',\n    libraryTarget: 'umd',\n    library: '...'\n  },\n  entry: '...',\n  ...\n  externals: {\n    react: 'react'\n    // Use more complicated mapping for lodash.\n    // We need to access it differently depending\n    // on the environment.\n    lodash: {\n      commonjs: 'lodash',\n      commonjs2: 'lodash',\n      amd: '_',\n      root: '_'\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlsdg%2Fwebpack2-library-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxlsdg%2Fwebpack2-library-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxlsdg%2Fwebpack2-library-starter/lists"}