purus 0.9.0 → 0.9.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/bin/purus.js +5 -5
- package/package.json +10 -14
- package/{lib → pkg/lib}/build-wrapper.js +4 -0
- package/{lib → pkg/lib}/purus-compiler.js +2832 -2821
- package/{lib → pkg/lib}/purus-core.js +1 -1
- /package/{index.d.ts → pkg/index.d.ts} +0 -0
- /package/{index.js → pkg/index.js} +0 -0
- /package/{index.mjs → pkg/index.mjs} +0 -0
- /package/{lib → pkg/lib}/check-wrapper.js +0 -0
- /package/{lib → pkg/lib}/config.js +0 -0
- /package/{lib → pkg/lib}/create.js +0 -0
- /package/{lib → pkg/lib}/run-wrapper.js +0 -0
- /package/{lib → pkg/lib}/stdlib.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-array.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-datetime.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-error.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-json.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-map.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-math.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-number.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-object.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-promise.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-random.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-regexp.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-set.js +0 -0
- /package/{stdlib → pkg/stdlib}/p-string.js +0 -0
package/bin/purus.js
CHANGED
|
@@ -51,17 +51,17 @@ function printHelp() {
|
|
|
51
51
|
switch (cmd) {
|
|
52
52
|
case "new":
|
|
53
53
|
case "create":
|
|
54
|
-
require("../lib/create.js");
|
|
54
|
+
require("../pkg/lib/create.js");
|
|
55
55
|
break;
|
|
56
56
|
case "build":
|
|
57
57
|
case "compile":
|
|
58
|
-
require("../lib/build-wrapper.js");
|
|
58
|
+
require("../pkg/lib/build-wrapper.js");
|
|
59
59
|
break;
|
|
60
60
|
case "run":
|
|
61
|
-
require("../lib/run-wrapper.js");
|
|
61
|
+
require("../pkg/lib/run-wrapper.js");
|
|
62
62
|
break;
|
|
63
63
|
case "check":
|
|
64
|
-
require("../lib/check-wrapper.js");
|
|
64
|
+
require("../pkg/lib/check-wrapper.js");
|
|
65
65
|
break;
|
|
66
66
|
case "version":
|
|
67
67
|
case "--version":
|
|
@@ -75,6 +75,6 @@ switch (cmd) {
|
|
|
75
75
|
printHelp();
|
|
76
76
|
break;
|
|
77
77
|
default:
|
|
78
|
-
require("../lib/purus-compiler.js");
|
|
78
|
+
require("../pkg/lib/purus-compiler.js");
|
|
79
79
|
break;
|
|
80
80
|
}
|
package/package.json
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "purus",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Purus - /ˈpuː.rus/ means pure✨ in Latin - is a beautiful, simple, and easy-to-use language. It compiles to JavaScript. It makes your fingers free from the Shift key. With Purus, you can write code almost without pressing the Shift key.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "index.mjs",
|
|
7
|
-
"types": "index.d.ts",
|
|
5
|
+
"main": "pkg/index.js",
|
|
6
|
+
"module": "pkg/index.mjs",
|
|
7
|
+
"types": "pkg/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./index.d.ts",
|
|
11
|
-
"import": "./index.mjs",
|
|
12
|
-
"require": "./index.js"
|
|
10
|
+
"types": "./pkg/index.d.ts",
|
|
11
|
+
"import": "./pkg/index.mjs",
|
|
12
|
+
"require": "./pkg/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
16
|
"purus": "bin/purus.js"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
|
-
"
|
|
20
|
-
"index.mjs",
|
|
21
|
-
"index.d.ts",
|
|
19
|
+
"pkg/",
|
|
22
20
|
"bin/",
|
|
23
|
-
"lib/",
|
|
24
|
-
"stdlib/",
|
|
25
21
|
"LICENSE",
|
|
26
22
|
"README.md",
|
|
27
23
|
"README-ja.md"
|
|
@@ -33,8 +29,8 @@
|
|
|
33
29
|
"build": "npm run build:compiler && npm run build:copy",
|
|
34
30
|
"lint": "moon check",
|
|
35
31
|
"lint:fix": "moon fmt",
|
|
36
|
-
"format": "moon fmt && prettier --write ./bin ./
|
|
37
|
-
"format:check": "moon fmt --check && prettier --check ./bin ./
|
|
32
|
+
"format": "moon fmt && prettier --write ./bin ./pkg ./scripts",
|
|
33
|
+
"format:check": "moon fmt --check && prettier --check ./bin ./pkg ./scripts",
|
|
38
34
|
"typecheck": "moon check",
|
|
39
35
|
"check": "npm run lint && npm run format:check && npm run build && npm run typecheck",
|
|
40
36
|
"sync": "node scripts/sync-version.js",
|
|
@@ -183,6 +183,10 @@ if (
|
|
|
183
183
|
|
|
184
184
|
let count = 0;
|
|
185
185
|
for (const f of files) {
|
|
186
|
+
// Skip config.purus itself - it's the build config, not a source file
|
|
187
|
+
if (configResult && path.resolve(f) === path.resolve(configResult.configPath)) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
186
190
|
const source = fs.readFileSync(f, "utf8");
|
|
187
191
|
const resolvedModule = resolveModuleType(f, moduleType, configResult);
|
|
188
192
|
const js = compile(source, {
|