rantjs 1.0.10 → 2.1.0

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/package.json CHANGED
@@ -1,67 +1,21 @@
1
1
  {
2
- "_args": [
3
- [
4
- {
5
- "raw": "rantjs",
6
- "scope": null,
7
- "escapedName": "rantjs",
8
- "name": "rantjs",
9
- "rawSpec": "",
10
- "spec": "latest",
11
- "type": "tag"
12
- },
13
- "/Users/svena/vm/rantnpm"
14
- ]
15
- ],
16
- "_from": "rantjs@latest",
17
- "_id": "rantjs@1.0.6",
18
- "_inCache": true,
19
- "_location": "/rantjs",
20
- "_nodeVersion": "6.2.1",
21
- "_npmOperationalInternal": {
22
- "host": "packages-12-west.internal.npmjs.com",
23
- "tmp": "tmp/rantjs-1.0.6.tgz_1467090982094_0.7638147184625268"
24
- },
25
- "_npmUser": {
26
- "name": "svenanders",
27
- "email": "anders@robbestad.com"
28
- },
29
- "_npmVersion": "3.9.3",
30
- "_phantomChildren": {},
31
- "_requested": {
32
- "raw": "rantjs",
33
- "scope": null,
34
- "escapedName": "rantjs",
35
- "name": "rantjs",
36
- "rawSpec": "",
37
- "spec": "latest",
38
- "type": "tag"
39
- },
40
- "_requiredBy": [
41
- "#USER"
42
- ],
43
- "_resolved": "https://registry.npmjs.org/rantjs/-/rantjs-1.0.6.tgz",
44
- "_shasum": "0995e6af8e048050cabec440270b91631a31bf3b",
45
- "_shrinkwrap": null,
46
- "_spec": "rantjs",
47
- "_where": "/Users/svena/vm/rantnpm",
2
+ "name": "rantjs",
3
+ "version": "2.1.0",
4
+ "description": "A procedural text generator for JavaScript",
5
+ "license": "ISC",
48
6
  "author": {
49
7
  "name": "Sven Anders Robbestad",
50
8
  "email": "anders@robbestad.com",
51
- "url": "http://www.robbestad.com/"
9
+ "url": "https://www.robbestad.com/"
52
10
  },
53
- "bugs": {
54
- "url": "https://github.com/svenanders/rantjs/issues"
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/robbestad/Rantjs.git"
55
14
  },
56
- "dependencies": {},
57
- "description": "A procedural text generator for JavaScript",
58
- "devDependencies": {},
59
- "directories": {},
60
- "dist": {
61
- "shasum": "0995e6af8e048050cabec440270b91631a31bf3b",
62
- "tarball": "https://registry.npmjs.org/rantjs/-/rantjs-1.0.6.tgz"
15
+ "homepage": "https://github.com/robbestad/Rantjs",
16
+ "bugs": {
17
+ "url": "https://github.com/robbestad/Rantjs/issues"
63
18
  },
64
- "homepage": "http://www.robbestad.com/blog/procedurally-generated-text-with-rantjs",
65
19
  "keywords": [
66
20
  "rant",
67
21
  "procedural",
@@ -69,26 +23,55 @@
69
23
  "generator",
70
24
  "javascript",
71
25
  "random",
72
- "text",
73
26
  "sentences"
74
27
  ],
75
- "license": "ISC",
76
- "main": "index.js",
77
- "maintainers": [
78
- {
79
- "name": "svenanders",
80
- "email": "anders@robbestad.com"
28
+ "type": "module",
29
+ "sideEffects": false,
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "main": "./dist/index.cjs",
34
+ "module": "./dist/index.js",
35
+ "types": "./dist/index.d.ts",
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "import": "./dist/index.js",
40
+ "require": "./dist/index.cjs"
81
41
  }
82
- ],
83
- "name": "rantjs",
84
- "optionalDependencies": {},
85
- "readme": "ERROR: No README data found!",
86
- "repository": {
87
- "type": "git",
88
- "url": "git+https://github.com/svenanders/rantjs.git"
89
42
  },
43
+ "bin": {
44
+ "rantjs": "dist/cli.js"
45
+ },
46
+ "unpkg": "./dist/rant.min.js",
47
+ "jsdelivr": "./dist/rant.min.js",
48
+ "files": [
49
+ "dist/index.js",
50
+ "dist/index.cjs",
51
+ "dist/index.d.ts",
52
+ "dist/index.d.cts",
53
+ "dist/cli.js",
54
+ "dist/rant.js",
55
+ "dist/rant.min.js",
56
+ "LICENSE",
57
+ "README.md"
58
+ ],
90
59
  "scripts": {
91
- "build": " browserify index.js -o index.min.js"
60
+ "build": "npm run build:dict && rm -rf dist && tsup",
61
+ "build:dict": "tsx scripts/compile-dictionaries.ts",
62
+ "test": "npm run build:dict && vitest run",
63
+ "test:watch": "vitest",
64
+ "typecheck": "tsc --noEmit",
65
+ "demo": "npm run build:dict && vite --config demo/vite.config.ts",
66
+ "demo:build": "npm run build:dict && vite build --config demo/vite.config.ts",
67
+ "prepublishOnly": "npm run test && npm run build"
92
68
  },
93
- "version": "1.0.10"
69
+ "devDependencies": {
70
+ "@types/node": "^26.4.0",
71
+ "tsup": "^8.5.1",
72
+ "tsx": "^4.23.13",
73
+ "typescript": "~5.6.3",
74
+ "vite": "^8.2.2",
75
+ "vitest": "^4.1.11"
76
+ }
94
77
  }
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="CompilerConfiguration">
4
- <resourceExtensions />
5
- <wildcardResourcePatterns>
6
- <entry name="!?*.java" />
7
- <entry name="!?*.form" />
8
- <entry name="!?*.class" />
9
- <entry name="!?*.groovy" />
10
- <entry name="!?*.scala" />
11
- <entry name="!?*.flex" />
12
- <entry name="!?*.kt" />
13
- <entry name="!?*.clj" />
14
- <entry name="!?*.aj" />
15
- </wildcardResourcePatterns>
16
- <annotationProcessing>
17
- <profile default="true" name="Default" enabled="false">
18
- <processorPath useClasspath="true" />
19
- </profile>
20
- </annotationProcessing>
21
- </component>
22
- </project>
@@ -1,3 +0,0 @@
1
- <component name="CopyrightManager">
2
- <settings default="" />
3
- </component>
package/.idea/misc.xml DELETED
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectLevelVcsManager" settingsEditedManually="false">
4
- <OptionsSetting value="true" id="Add" />
5
- <OptionsSetting value="true" id="Remove" />
6
- <OptionsSetting value="true" id="Checkout" />
7
- <OptionsSetting value="true" id="Update" />
8
- <OptionsSetting value="true" id="Status" />
9
- <OptionsSetting value="true" id="Edit" />
10
- <ConfirmationsSetting value="0" id="Add" />
11
- <ConfirmationsSetting value="0" id="Remove" />
12
- </component>
13
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="true" assert-keyword="false" jdk-15="false" />
14
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/rantnpm.iml" filepath="$PROJECT_DIR$/.idea/rantnpm.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/rantnpm.iml DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>