{"name":"css-modules-typescript-loader","version":"4.0.1","description":"Webpack loader to create TypeScript declarations for CSS Modules","main":"index.js","repository":{"type":"git","url":"git+https://github.com/seek-oss/css-modules-typescript-loader.git"},"author":{"name":"SEEK"},"license":"MIT","bugs":{"url":"https://github.com/seek-oss/css-modules-typescript-loader/issues"},"scripts":{"commit":"git-cz","travis-deploy-once":"travis-deploy-once","semantic-release":"semantic-release","test":"jest"},"jest":{"testEnvironment":"node"},"husky":{"hooks":{"commit-msg":"commitlint --edit --extends seek"}},"homepage":"https://github.com/seek-oss/css-modules-typescript-loader#readme","dependencies":{"line-diff":"^2.0.1","loader-utils":"^1.2.3"},"devDependencies":{"@commitlint/cli":"^7.2.1","commitizen":"^3.0.2","commitlint-config-seek":"^1.0.0","css-loader":"^4.2.1","cz-conventional-changelog":"^2.1.0","husky":"^1.1.2","jest":"^24.7.1","memory-fs":"^0.4.1","semantic-release":"^15.9.17","travis-deploy-once":"^5.0.9","webpack":"^4.21.0"},"release":{"success":false},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"gitHead":"bb4892a5cae169bae8bd0aa1eecdc08e2b2331bf","_id":"css-modules-typescript-loader@4.0.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.8","dist":{"integrity":"sha512-vXrUAwPGcRaopnGdg7I5oqv/NSSKQRN5L80m3f49uSGinenU5DTNsMFHS+2roh5tXqpY5+yAAKAl7A2HDvumzg==","shasum":"0b818cf647fefd8f9fb3d4469374e69ab1e72742","tarball":"http://registry-npm.ywwl.com/css-modules-typescript-loader/download/css-modules-typescript-loader-4.0.1.tgz","fileCount":31,"unpackedSize":16270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfaVksCRA9TVsSAnZWagAADTMP/3N2q0SE4UQ+UjdlVf04\nqQW0y/oQkRoGyYsDhkpVQNVkLT2QmE9dKO1gJRNQq7fAKRDsStG2b38kTDns\nNJA0xxjHzIQbIGKa6fUfWL3t3OmKZfKEBzNNdr7AehzDWOh5Z8hhAxdCnEft\nfTUA4JsBSOFBXAHkUaNiJ23j0c7HpFLYDp+ZpX3Crq8Hb47FllQblLAbIFes\nCjwRZ6AqYBSyfJ6tEqQ/FDLGyWRT9kIa4c8IjLcXrtCakk3iRXCRuiQd6dRI\nQK5Jj4SMkHmGnvTg42t6Ec/TJvlhSumNoOmQ1YkG1OY9sp7H1pPIGB1K6gAz\nh1VZUOHyDdH2VDWiwwJKQ1NiiWo5ftqIehZA5ggC6f+sjZHU7D20LWdn24Hz\nbgT5BrKvTyZuVZVmI0TjbuB3GkJGZeKjFxOEPaBwHe8M32lZh2w+BaPL0OF+\nWpk6krIF6MyDzZKUgwrNfysHZim1MYGXosmqBKTLPvr2HWT/Fr/j5GJo6rIS\nHLI37uqZxq4SEenGjCME8mcXAixKOi/QajAcPpaMoSQgbpd/cs5WnttLd62o\nfgHKMTcLn6IOjh+uLqQIB8oe7oirWnu8opXwJ0VQuXe9bb59crCMBkm/V85X\nLqQEcOE8Aa4PG9ijqYhVRhZE+Y9vPqZ1DsjyKYr6yQOkgBVrF4w8/EQCXV9F\nLnHc\r\n=uCwA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLAFDqyKe/kymf70F1pKMs+x4ob0E8o+xcQpUX6fvrwAiEAr0SyHO1U5IUSW4WYTiS8jCCYAAjGHgeQ/jY0GAna/Ws="}],"size":6005,"noattachment":false,"key":"/css-modules-typescript-loader/-/css-modules-typescript-loader-4.0.1.tgz"},"maintainers":[{"name":"seek-oss-ci","email":"opensource@seek.com.au"}],"_npmUser":{"name":"seek-oss-ci","email":"opensource@seek.com.au"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-modules-typescript-loader_4.0.1_1600739628080_0.9423907094042467"},"_hasShrinkwrap":false,"readme":"[![Build Status](https://img.shields.io/travis/seek-oss/css-modules-typescript-loader/master.svg?style=flat-square)](http://travis-ci.org/seek-oss/css-modules-typescript-loader) [![npm](https://img.shields.io/npm/v/css-modules-typescript-loader.svg?style=flat-square)](https://www.npmjs.com/package/css-modules-typescript-loader) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/)\n\n# css-modules-typescript-loader\n\n[Webpack](https://webpack.js.org/) loader to create [TypeScript](https://www.typescriptlang.org/) declarations for [CSS Modules](https://github.com/css-modules/css-modules).\n\nEmits TypeScript declaration files matching your CSS Modules in the same location as your source files, e.g. `src/Component.css` will generate `src/Component.css.d.ts`.\n\n## Why?\n\nThere are currently a lot of [solutions to this problem](https://www.npmjs.com/search?q=css%20modules%20typescript%20loader). However, this package differs in the following ways:\n\n- Encourages generated TypeScript declarations to be checked into source control, which allows `webpack` and `tsc` commands to be run in parallel in CI.\n\n- Ensures committed TypeScript declarations are in sync with the code that generated them via the [`verify` mode](#verify-mode).\n\n## Usage\n\nPlace `css-modules-typescript-loader` directly after `css-loader` in your webpack config.\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.css$/,\n        use: [\n          'css-modules-typescript-loader',\n          {\n            loader: 'css-loader',\n            options: {\n              modules: true\n            }\n          }\n        ]\n      }\n    ]\n  }\n};\n```\n\n### Verify Mode\n\nSince the TypeScript declarations are generated by `webpack`, they may potentially be out of date by the time you run `tsc`. To ensure your types are up to date, you can run the loader in `verify` mode, which is particularly useful in CI.\n\nFor example:\n\n```js\n{\n  loader: 'css-modules-typescript-loader',\n  options: {\n    mode: process.env.CI ? 'verify' : 'emit'\n  }\n}\n```\n\nInstead of emitting new TypeScript declarations, this will throw an error if a generated declaration doesn't match the committed one. This allows `tsc` and `webpack` to run in parallel in CI, if desired.\n\nThis workflow is similar to using the [Prettier](https://github.com/prettier/prettier) [`--list-different` option](https://prettier.io/docs/en/cli.html#list-different).\n\n## With Thanks\n\nThis package borrows heavily from [typings-for-css-modules-loader](https://github.com/Jimdo/typings-for-css-modules-loader).\n\n## License\n\nMIT.\n","publish_time":1600739628192,"_cnpm_publish_time":1600739628192,"dist-tags":{"latest":"4.0.1"}}