@w5s/dev 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/lib/index.d.ts +46 -0
- package/lib/index.js +60 -0
- package/lib/index.js.map +1 -0
- package/package.json +59 -0
- package/src/index.ts +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Julien Polo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=# W5s Prettier configuration _(${name})_) -->
|
|
2
|
+
# W5s Prettier configuration _(@w5s/dev)_
|
|
3
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
4
|
+
|
|
5
|
+
[![NPM Version][package-version-svg]][package-url]
|
|
6
|
+
[![License][license-image]][license-url]
|
|
7
|
+
|
|
8
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=> ${description}&unknownTxt= ) -->
|
|
9
|
+
> Shared development constants and functions
|
|
10
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=```console\nnpm install --save-dev ${name}\n```) -->
|
|
15
|
+
```console
|
|
16
|
+
npm install --save-dev @w5s/dev
|
|
17
|
+
```
|
|
18
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=```json\n"${name}"\n```) -->
|
|
23
|
+
```json
|
|
24
|
+
"@w5s/dev"
|
|
25
|
+
```
|
|
26
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
27
|
+
|
|
28
|
+
## License
|
|
29
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[${license}][license-url] © ${author}) -->
|
|
30
|
+
[MIT][license-url] © Julien Polo <julien.polo@gmail.com>
|
|
31
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
32
|
+
|
|
33
|
+
<!-- VARIABLES -->
|
|
34
|
+
|
|
35
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-version-svg]: https://img.shields.io/npm/v/${name}.svg?style=flat-square) -->
|
|
36
|
+
[package-version-svg]: https://img.shields.io/npm/v/@w5s/dev.svg?style=flat-square
|
|
37
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
38
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[package-url]: https://www.npmjs.com/package/${name}) -->
|
|
39
|
+
[package-url]: https://www.npmjs.com/package/@w5s/dev
|
|
40
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
41
|
+
<!-- AUTO-GENERATED-CONTENT:START (PKG_JSON:template=[license-image]: https://img.shields.io/badge/license-${license}-green.svg?style=flat-square) -->
|
|
42
|
+
[license-image]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
|
|
43
|
+
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
44
|
+
[license-url]: ../../LICENSE
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported ECMA version
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* ECMA_VERSION // 2022
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export declare const ECMA_VERSION = 2022;
|
|
10
|
+
/**
|
|
11
|
+
* Files and folders to always ignore
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* IGNORE_LIST // ['node_modules/', 'build/', ...]
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const IGNORE_LIST: string[];
|
|
19
|
+
/**
|
|
20
|
+
* Supported file extensions
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* EXTENSIONS // ['.ts', '.js', ...]
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const EXTENSIONS: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Supported file extensions without starting dots
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* EXTENSIONS_WITHOUT_DOT // ['ts', 'js', ...]
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const EXTENSIONS_WITHOUT_DOT: string[];
|
|
37
|
+
/**
|
|
38
|
+
* List of globs to find config related files
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* CONFIG_GLOB_LIST // ['**\/.*.{js,cjs}', '**\/*.config.{js,cjs}']
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const CONFIG_GLOB_LIST: string[];
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONFIG_GLOB_LIST = exports.EXTENSIONS_WITHOUT_DOT = exports.EXTENSIONS = exports.IGNORE_LIST = exports.ECMA_VERSION = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Supported ECMA version
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* ECMA_VERSION // 2022
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
exports.ECMA_VERSION = 2022;
|
|
13
|
+
/**
|
|
14
|
+
* Files and folders to always ignore
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* IGNORE_LIST // ['node_modules/', 'build/', ...]
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
exports.IGNORE_LIST = [
|
|
22
|
+
'node_modules/',
|
|
23
|
+
'build/',
|
|
24
|
+
'cjs/',
|
|
25
|
+
'coverage/',
|
|
26
|
+
'dist/',
|
|
27
|
+
'dts/',
|
|
28
|
+
'esm/',
|
|
29
|
+
'lib/',
|
|
30
|
+
'mjs/',
|
|
31
|
+
'umd/',
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Supported file extensions
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* EXTENSIONS // ['.ts', '.js', ...]
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
exports.EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx', '.cjs', '.mjs'];
|
|
42
|
+
/**
|
|
43
|
+
* Supported file extensions without starting dots
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* EXTENSIONS_WITHOUT_DOT // ['ts', 'js', ...]
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
exports.EXTENSIONS_WITHOUT_DOT = exports.EXTENSIONS.map((ext) => ext.slice(1));
|
|
51
|
+
/**
|
|
52
|
+
* List of globs to find config related files
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* CONFIG_GLOB_LIST // ['**\/.*.{js,cjs}', '**\/*.config.{js,cjs}']
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
exports.CONFIG_GLOB_LIST = ['**/.*.{js,cjs}', '**/*.config.{js,cjs}'];
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACU,QAAA,YAAY,GAAG,IAAI,CAAC;AAEjC;;;;;;;GAOG;AACU,QAAA,WAAW,GAAG;IACzB,eAAe;IACf,QAAQ;IACR,MAAM;IACN,WAAW;IACX,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAC;AAEF;;;;;;;GAOG;AACU,QAAA,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEzF;;;;;;;GAOG;AACU,QAAA,sBAAsB,GAAG,kBAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5E;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@w5s/dev",
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
|
+
"description": "Shared development constants and functions",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"config",
|
|
7
|
+
"dev"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/w5s/project-config/blob/main/packagesdev#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/w5s/project-config/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git@github.com:w5s/project-config.git",
|
|
16
|
+
"directory": "packages/dev"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Julien Polo <julien.polo@gmail.com>",
|
|
20
|
+
"type": "commonjs",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": "./lib/index.js",
|
|
23
|
+
"./lib/*": "./lib/*"
|
|
24
|
+
},
|
|
25
|
+
"typings": "./index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"lib/**/!(*.spec).d.ts",
|
|
28
|
+
"lib/**/!(*.spec).js.map",
|
|
29
|
+
"lib/**/!(*.spec).js",
|
|
30
|
+
"src/**/!(*.spec).ts",
|
|
31
|
+
"!example/**/*",
|
|
32
|
+
"!*.cjs",
|
|
33
|
+
"index.js",
|
|
34
|
+
"index.d.ts"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "concurrently \"npm:build:*\" \":\"",
|
|
38
|
+
"build:tsc": "tsc",
|
|
39
|
+
"clean": "concurrently \"npm:clean:*\" \":\"",
|
|
40
|
+
"clean:src": "rm -rf lib/*",
|
|
41
|
+
"docs": "md-magic --path '**/*.md' --ignore='node_modules'",
|
|
42
|
+
"format": "concurrently \"npm:format:*\" \":\"",
|
|
43
|
+
"format:src": "eslint . --fix --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
|
|
44
|
+
"lint": "concurrently \"npm:lint:*\" \":\"",
|
|
45
|
+
"lint:src": "eslint . --ext=mjs,cjs,js,jsx,ts,tsx,json,jsonc,json5,yml,yaml",
|
|
46
|
+
"prepare": "concurrently \"npm:prepare:*\" \":\"",
|
|
47
|
+
"prepublishOnly": "npm run clean;npm run build",
|
|
48
|
+
"spellcheck": "cspell --no-progress '**'",
|
|
49
|
+
"test": "concurrently \"npm:test:*\" ",
|
|
50
|
+
"test:src": "exit 0"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=16.0.0"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"gitHead": "68e11c0644e8d162b5b08bb4f40b4e42810e51bd"
|
|
59
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported ECMA version
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* ECMA_VERSION // 2022
|
|
7
|
+
* ```
|
|
8
|
+
*/
|
|
9
|
+
export const ECMA_VERSION = 2022;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Files and folders to always ignore
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* IGNORE_LIST // ['node_modules/', 'build/', ...]
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export const IGNORE_LIST = [
|
|
20
|
+
'node_modules/',
|
|
21
|
+
'build/',
|
|
22
|
+
'cjs/',
|
|
23
|
+
'coverage/',
|
|
24
|
+
'dist/',
|
|
25
|
+
'dts/',
|
|
26
|
+
'esm/',
|
|
27
|
+
'lib/',
|
|
28
|
+
'mjs/',
|
|
29
|
+
'umd/',
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Supported file extensions
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* EXTENSIONS // ['.ts', '.js', ...]
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export const EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx', '.cjs', '.mjs'];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Supported file extensions without starting dots
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* EXTENSIONS_WITHOUT_DOT // ['ts', 'js', ...]
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export const EXTENSIONS_WITHOUT_DOT = EXTENSIONS.map((ext) => ext.slice(1));
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* List of globs to find config related files
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* CONFIG_GLOB_LIST // ['**\/.*.{js,cjs}', '**\/*.config.{js,cjs}']
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export const CONFIG_GLOB_LIST = ['**/.*.{js,cjs}', '**/*.config.{js,cjs}'];
|