@reflex-stack/tsp 0.1.7 → 0.1.9

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/README.md CHANGED
@@ -39,7 +39,7 @@ This will ask some questions and create those files. It contains 1 **submodule**
39
39
  │ └─ tsconfig.json ( to have correct typings in test.js )
40
40
  ├─ .gitignore
41
41
  ├─ .npmignore
42
- ├─ LICENCE ( if MIT )
42
+ ├─ LICENSE ( if MIT )
43
43
  ├─ package.json
44
44
  ├─ package-lock.json
45
45
  ├─ README.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reflex-stack/tsp",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "tsp": "./src/cli.js"
@@ -6,9 +6,9 @@ import { Stach } from "stach";
6
6
  import { mkdirSync } from "fs";
7
7
  import { join } from "node:path";
8
8
 
9
- const licenceTemplate = `MIT License
9
+ const licenseTemplate = `MIT License
10
10
 
11
- Copyright (c) 2022 {{ authorName }}
11
+ Copyright (c) {{ year }} {{ authorName }}
12
12
 
13
13
  Permission is hereby granted, free of charge, to any person obtaining a copy
14
14
  of this software and associated documentation files (the "Software"), to deal
@@ -110,7 +110,7 @@ dist
110
110
 
111
111
  const npmIgnoreTemplate = `.DS_Store
112
112
  .idea
113
- LICENCE
113
+ LICENSE
114
114
  tmp/
115
115
  src/
116
116
  .github/
@@ -193,9 +193,9 @@ export async function init () {
193
193
  options.packageTextName = await askInput(`Package name, in plain text {d}ex : My Package`, { notEmpty: true })
194
194
  options.packageNPMName = await askInput(`Package name, for NPM, with namespace {d}ex : @mynamespace/mypackage`, { notEmpty: true })
195
195
  options.authorName = await askInput(`Author name`, { notEmpty: true })
196
- options.licenceName = await askInput(`Licence name`, { defaultValue: "MIT" })
196
+ options.licenseName = await askInput(`License name`, { defaultValue: "MIT" })
197
197
  options.esLevel = await askInput(`ES Level for tsconfig`, { defaultValue: "es2023" })
198
- options.tsStrict = await askList(`Use strict Typescript?`, ["Yes", "No"], { defaultIndex: 1, returnType: "index" })
198
+ options.tsStrict = await askList(`Use strict Typescript?`, ["Yes", "No"], { defaultIndex: 0, returnType: "index" })
199
199
  options.domAccess = await askList(`Will it have access to DOM?`, ["Yes", "No"], { defaultIndex: 0, returnType: "index" })
200
200
  options.svgReport = await askList(`Export SVG size report on build for README.md?`, ["Yes", "No"], { defaultIndex: 0, returnType: "index" })
201
201
  options.jsonReport = await askList(`Export JSON size report on build?`, ["Yes", "No"], { defaultIndex: 1, returnType: "index" })
@@ -213,7 +213,7 @@ export async function init () {
213
213
  version: "0.1.0",
214
214
  type: "module",
215
215
  author: options.authorName,
216
- licence: options.licenceName,
216
+ license: options.licenseName,
217
217
  main: "./dist/index.js",
218
218
  types: "./dist/index.d.ts",
219
219
  exports: {
@@ -257,13 +257,15 @@ export async function init () {
257
257
  packageJson.repository.directory = options.relativeGitSubDirectory
258
258
  }
259
259
  }
260
+ // Inject year
261
+ options.year = new Date().getFullYear()
260
262
  // Create directories
261
263
  mkdirSync(config.tests, { recursive: true })
262
264
  mkdirSync(config.dist, { recursive: true })
263
265
  mkdirSync(join(config.src, "submodule"), { recursive: true })
264
266
  // Generate root files
265
- if ( options.licenceName === "MIT" )
266
- writeFileSync("LICENCE", Stach(licenceTemplate, options))
267
+ if ( options.licenseName === "MIT" )
268
+ writeFileSync("LICENSE", Stach(licenseTemplate, options))
267
269
  writeFileSync("README.md", Stach(readmeTemplate, options))
268
270
  writeFileSync(".gitignore", Stach(gitIgnoreTemplate, options))
269
271
  writeFileSync(".npmignore", Stach(npmIgnoreTemplate, options))
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Alexis Bouhet
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.
@@ -3,7 +3,7 @@
3
3
  "version": "0.1.3",
4
4
  "type": "module",
5
5
  "author": "Alexis Bouhet",
6
- "licence": "MIT",
6
+ "license": "MIT",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {