File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Usage
2+ 1 . Generate an updated full.dcignore file based on the generator script.
3+ ``` shell script
4+ $ cd < repo-location>
5+ $ npm run generate
6+ ```
7+ 2 . Check the file contents in the root directory of this repository.
8+ ``` shell script
9+ $ cat empty.dcignore
10+ $ cat full.dcignore
11+ ```
12+ 3 . Tinker with the script to fine-tune the generator or edit the output files directly
13+ 4 . Test the package locally to debug it
14+ 6 . Publish the new version once pleased with the results
15+
16+ ## Test package
17+
18+ 1 . To use and debug package locally you don't need publish it to NPM registry:
19+ ``` shell script
20+ $ cd < repo-location>
21+ $ npm link
22+ ```
23+ 2 . After that you have to create symlink to this package in the folder of the project where you want to test it:
24+ ``` shell script
25+ $ cd < project-location>
26+ $ npm link @deepcode/dcignore
27+ ```
28+ 3 . Add package to your ` package.json ` :
29+ ``` json
30+ "dependencies" : {
31+ "@deepcode/dcignore" : " ^1.0.0"
32+ }
33+ ```
34+ 4 . Now you can use this package as usual:
35+ ``` javascript
36+ const { DefaultDCIgnore , CustomDCIgnore } = require (' @deepcode/dcignore' );
37+
38+ console .log (DefaultDCIgnore);
39+ ```
40+
41+ ## Publishing
42+
43+ 1 . Before publishing make sure you are logged in using the company credentials
44+ ``` shell script
45+ $ npm login
46+ ```
47+ 2 . Publish
48+ ``` shell script
49+ $ cd < repo-location>
50+ $ npm publish --access public
51+ ```
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments