@makano/rew 1.1.7 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/bin/ui +0 -0
- package/build.sh +3 -1
- package/lib/coffeescript/browser.js +144 -139
- package/lib/coffeescript/cake.js +132 -133
- package/lib/coffeescript/coffeescript.js +437 -381
- package/lib/coffeescript/command.js +806 -724
- package/lib/coffeescript/grammar.js +1908 -2474
- package/lib/coffeescript/helpers.js +509 -473
- package/lib/coffeescript/index.js +228 -215
- package/lib/coffeescript/lexer.js +2282 -1909
- package/lib/coffeescript/nodes.js +9782 -9202
- package/lib/coffeescript/optparse.js +255 -227
- package/lib/coffeescript/parser.js +20305 -1265
- package/lib/coffeescript/register.js +107 -87
- package/lib/coffeescript/repl.js +307 -284
- package/lib/coffeescript/rewriter.js +1389 -1079
- package/lib/coffeescript/scope.js +176 -172
- package/lib/coffeescript/sourcemap.js +242 -227
- package/lib/rew/cli/cli.js +245 -186
- package/lib/rew/cli/log.js +31 -32
- package/lib/rew/cli/run.js +10 -12
- package/lib/rew/cli/utils.js +248 -175
- package/lib/rew/const/config_path.js +4 -0
- package/lib/rew/const/default.js +38 -35
- package/lib/rew/const/files.js +9 -9
- package/lib/rew/const/opt.js +8 -8
- package/lib/rew/css/theme.css +2 -2
- package/lib/rew/functions/core.js +55 -57
- package/lib/rew/functions/curl.js +23 -0
- package/lib/rew/functions/emitter.js +52 -55
- package/lib/rew/functions/exec.js +25 -21
- package/lib/rew/functions/export.js +18 -20
- package/lib/rew/functions/fs.js +55 -54
- package/lib/rew/functions/future.js +29 -21
- package/lib/rew/functions/id.js +8 -9
- package/lib/rew/functions/import.js +104 -93
- package/lib/rew/functions/map.js +13 -16
- package/lib/rew/functions/match.js +35 -26
- package/lib/rew/functions/path.js +8 -8
- package/lib/rew/functions/require.js +32 -33
- package/lib/rew/functions/sleep.js +2 -2
- package/lib/rew/functions/stdout.js +20 -20
- package/lib/rew/functions/types.js +96 -95
- package/lib/rew/html/ui.html +12 -13
- package/lib/rew/html/ui.js +205 -168
- package/lib/rew/main.js +14 -14
- package/lib/rew/misc/findAppInfo.js +16 -0
- package/lib/rew/misc/findAppPath.js +21 -0
- package/lib/rew/misc/seededid.js +13 -0
- package/lib/rew/models/enum.js +12 -12
- package/lib/rew/models/struct.js +30 -32
- package/lib/rew/modules/compiler.js +228 -177
- package/lib/rew/modules/context.js +35 -22
- package/lib/rew/modules/fs.js +10 -10
- package/lib/rew/modules/runtime.js +17 -21
- package/lib/rew/modules/yaml.js +27 -30
- package/lib/rew/pkgs/conf.js +82 -75
- package/lib/rew/pkgs/data.js +12 -7
- package/lib/rew/pkgs/date.js +27 -28
- package/lib/rew/pkgs/env.js +6 -8
- package/lib/rew/pkgs/modules/data/bintree.js +52 -52
- package/lib/rew/pkgs/modules/data/doublylinked.js +85 -85
- package/lib/rew/pkgs/modules/data/linkedList.js +73 -73
- package/lib/rew/pkgs/modules/data/queue.js +19 -20
- package/lib/rew/pkgs/modules/data/stack.js +19 -19
- package/lib/rew/pkgs/modules/threads/worker.js +36 -26
- package/lib/rew/pkgs/modules/ui/classes.js +182 -178
- package/lib/rew/pkgs/pkgs.js +9 -10
- package/lib/rew/pkgs/rune.js +422 -0
- package/lib/rew/pkgs/threads.js +57 -53
- package/lib/rew/pkgs/ui.js +148 -136
- package/meson.build +13 -0
- package/package.json +9 -2
package/lib/rew/cli/utils.js
CHANGED
@@ -11,181 +11,254 @@ const { generateRandomID } = require('../functions/id');
|
|
11
11
|
const npm_package_name = '@makano/rew';
|
12
12
|
|
13
13
|
module.exports = {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
const appConfpath = path.join(apppath, 'app.yaml');
|
14
|
+
conf(command, fullPath, key, value) {
|
15
|
+
const con = conf({});
|
16
|
+
if (command == 'get') {
|
17
|
+
if (!fullPath || fullPath == 'list') {
|
18
|
+
return fs.readdirSync(con.CONFIG_PATH).join('\n');
|
19
|
+
} else {
|
20
|
+
const name = fullPath.indexOf('/') ? fullPath.split('/')[0] : fullPath;
|
21
|
+
const dpath = fullPath.indexOf('/') ? fullPath.split('/').slice(1).join('/') : '';
|
22
|
+
const root = con.create(name);
|
23
|
+
if (dpath) {
|
24
|
+
const fp = path.join(root.root, dpath);
|
25
|
+
if (fs.existsSync(fp) && fs.statSync(fp).isDirectory()) {
|
26
|
+
return fs.readdirSync(fp).join('\n');
|
27
|
+
} else {
|
28
|
+
const o = con.create(name).optionCenter(dpath);
|
29
|
+
return key ? o.get(key) : o.getAll(true);
|
30
|
+
}
|
31
|
+
} else {
|
32
|
+
return fs.readdirSync(root.root).join('\n');
|
33
|
+
}
|
34
|
+
}
|
35
|
+
} else {
|
36
|
+
const name = fullPath.indexOf('/') ? fullPath.split('/')[0] : fullPath;
|
37
|
+
const dpath = fullPath.indexOf('/') ? fullPath.split('/')[1] : '';
|
38
|
+
if (name && key) {
|
39
|
+
const root = con.create(name);
|
40
|
+
const o = dpath ? root.optionCenter(dpath) : root;
|
41
|
+
if (command == 'set') {
|
42
|
+
if (value) {
|
43
|
+
o.set(key, value);
|
44
|
+
} else {
|
45
|
+
log('Value not specified', ':end');
|
46
|
+
}
|
47
|
+
} else {
|
48
|
+
o.remove(key);
|
49
|
+
}
|
50
|
+
} else {
|
51
|
+
log(!name ? 'Path not specified' : 'Key not specified', ':end');
|
52
|
+
}
|
53
|
+
}
|
54
|
+
},
|
55
|
+
createProject: (ppath) => {
|
56
|
+
const projectPath = path.join(process.cwd(), ppath);
|
57
|
+
log('Crating at', ppath);
|
58
|
+
const rl = readline.createInterface({
|
59
|
+
input: process.stdin,
|
60
|
+
output: process.stdout,
|
61
|
+
});
|
62
|
+
const project = {};
|
63
|
+
const create = () => {
|
64
|
+
fs.mkdirSync(projectPath, { recursive: true });
|
65
|
+
const confPath = path.join(projectPath, 'app.yaml');
|
66
|
+
const entryFile = path.join(projectPath, 'main.coffee');
|
67
|
+
fs.writeFileSync(confPath, jsYaml.dump({ package: project.package, entry: 'main.coffee' }));
|
68
|
+
fs.writeFileSync(entryFile, `print("Hello World!")`);
|
69
|
+
if (project.git) {
|
70
|
+
fs.writeFileSync(path.join(projectPath, '.gitignore'), `node_modules/\npackage-lock.json`);
|
71
|
+
execSync('cd ' + projectPath + ' && git init .');
|
72
|
+
}
|
73
|
+
// log('Installing '+npm_package_name);
|
74
|
+
// exec('cd '+projectPath+' && npm i '+npm_package_name, (err) => {
|
75
|
+
// if(err){
|
76
|
+
// console.error(err);
|
77
|
+
// process.exit(0);
|
78
|
+
// } else {
|
79
|
+
// rl.close();
|
80
|
+
// }
|
81
|
+
// });
|
82
|
+
log('Done.', ':end');
|
83
|
+
rl.close();
|
84
|
+
};
|
85
|
+
if (!fs.existsSync(projectPath)) {
|
86
|
+
rl.question(logget('Package Name: '), (pkg) => {
|
87
|
+
if (pkg.trim()) {
|
88
|
+
project.package = pkg.trim();
|
89
|
+
rl.question(logget('Use git(y/N): '), (use_git) => {
|
90
|
+
project.git = use_git.toLowerCase() == 'y' || use_git.toLowerCase() == 'yes';
|
91
|
+
create();
|
92
|
+
});
|
93
|
+
} else {
|
94
|
+
rl.close();
|
95
|
+
}
|
96
|
+
});
|
97
|
+
} else {
|
98
|
+
log(`Project ${ppath} already exists at ${projectPath}`, ':end');
|
99
|
+
rl.close();
|
100
|
+
}
|
101
|
+
},
|
102
|
+
runApp(pathOrPackage) {
|
103
|
+
const apppath = path.resolve(process.cwd(), pathOrPackage);
|
104
|
+
const appConfpath = path.join(apppath, 'app.yaml');
|
106
105
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
}
|
106
|
+
const runAppRoot = (root, confPath) => {
|
107
|
+
const c = jsYaml.load(fs.readFileSync(confPath, { encoding: 'utf-8' }));
|
108
|
+
if (c.entry) {
|
109
|
+
const r = path.resolve(root, c.entry);
|
110
|
+
const mod_path = path.resolve(root, 'snode_moduless/@makano/rew');
|
111
|
+
const mod_path_lib = path.join(mod_path, 'lib/rew/cli');
|
112
|
+
if (fs.existsSync(mod_path) && __dirname !== mod_path_lib) {
|
113
|
+
const mod_path_utilsjs = path.join(mod_path_lib, '../main.js');
|
114
|
+
require(mod_path_utilsjs).run(r);
|
115
|
+
} else run(r);
|
116
|
+
}
|
117
|
+
};
|
120
118
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
119
|
+
if (fs.existsSync(apppath) && fs.existsSync(appConfpath)) {
|
120
|
+
runAppRoot(apppath, appConfpath);
|
121
|
+
} else {
|
122
|
+
const con = conf({});
|
123
|
+
const apppath = path.resolve(con.CONFIG_PATH, pathOrPackage, 'app');
|
124
|
+
const appConfpath = path.join(apppath, 'app.yaml');
|
125
|
+
if (fs.existsSync(apppath) && fs.existsSync(appConfpath)) {
|
126
|
+
runAppRoot(apppath, appConfpath);
|
127
|
+
}
|
128
|
+
}
|
129
|
+
},
|
130
|
+
installApp(pathname, rmidir, rmidiri) {
|
131
|
+
if (!pathname) {
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
const apppath = path.resolve(process.cwd(), pathname);
|
135
|
+
const appConfpath = path.join(apppath, 'app.yaml');
|
136
|
+
const appPackagepath = path.join(apppath, 'package.json');
|
137
|
+
if (fs.existsSync(apppath) && fs.existsSync(appConfpath)) {
|
138
|
+
const c = jsYaml.load(fs.readFileSync(appConfpath, { encoding: 'utf-8' }));
|
139
|
+
const p = JSON.parse(fs.readFileSync(appPackagepath, { encoding: 'utf-8' }));
|
140
|
+
const pname = c.package;
|
141
|
+
const installPath = path.join(conf({}).create(pname).root, 'app');
|
142
|
+
const rl = readline.createInterface({
|
143
|
+
input: process.stdin,
|
144
|
+
output: process.stdout,
|
145
|
+
});
|
146
|
+
log('Installing ' + pname);
|
147
|
+
log('Package: ' + p.name + '@' + p.version);
|
148
|
+
if (p.description) {
|
149
|
+
log('Description: ' + p.description);
|
150
|
+
}
|
151
|
+
rl.question(logget('Install ' + pname + '? (y/N)'), (f) => {
|
152
|
+
if (f.toLowerCase() == 'y') {
|
153
|
+
if (fs.existsSync(installPath)) {
|
154
|
+
execSync(`rm -r ${installPath}`);
|
155
|
+
}
|
156
|
+
execSync(`cp -r ${apppath} ${installPath}`);
|
157
|
+
execSync(`chmod 444 ${installPath}/app.yaml`);
|
158
|
+
if (rmidir) {
|
159
|
+
execSync(`rm -r ${apppath}`);
|
160
|
+
}
|
161
|
+
log('Installed ' + pname, ':end');
|
162
|
+
rl.close();
|
163
|
+
} else {
|
164
|
+
if (rmidiri) {
|
165
|
+
execSync(`rm -r ${apppath}`);
|
166
|
+
}
|
167
|
+
log('Canceled install', ':end');
|
168
|
+
rl.close();
|
169
|
+
}
|
170
|
+
});
|
171
|
+
} else {
|
172
|
+
log('Path is not a rew app', ':end');
|
173
|
+
}
|
174
|
+
},
|
175
|
+
async cloneGit(gitpath) {
|
176
|
+
const p = gitpath.split('github:')[1];
|
177
|
+
const url = `https://github.com/${p}`;
|
178
|
+
const apiurl = `https://api.github.com/repos/${p}`;
|
179
|
+
return await fetch(apiurl)
|
180
|
+
.then((r) => {
|
181
|
+
if (r.status !== 200) return log('Repo not found', ':end');
|
182
|
+
log('Cloning from github');
|
183
|
+
const tempPath = '/tmp/rew-git-clone-' + p.replace(/\//g, '_') + '-' + generateRandomID();
|
184
|
+
execSync(`git clone ${url} ${tempPath}`, { stdio: 'ignore' });
|
185
|
+
log('Installing deps...');
|
186
|
+
execSync(`cd ${tempPath} && npm i`);
|
187
|
+
return tempPath;
|
188
|
+
})
|
189
|
+
.catch((r) => log('Repo not found', ':end'));
|
190
|
+
},
|
191
|
+
findRepo(repo){
|
192
|
+
const repos = conf({}).create('').optionCenter('repos');
|
193
|
+
return repos.get(repo);
|
194
|
+
},
|
195
|
+
async installAppFrom(path){
|
196
|
+
if (path.startsWith('github:')) this.installApp(await this.cloneGit(path), true, true);
|
197
|
+
else if(path.startsWith('@')) this.fromRepo(path);
|
198
|
+
else this.installApp(path);
|
199
|
+
},
|
200
|
+
async getRepoJson(repoUrl){
|
201
|
+
try{
|
202
|
+
const text = await (await fetch(repoUrl.startsWith('//.') ? 'http://'+repoUrl.slice(3) : repoUrl.startsWith('//') ? 'https://'+repoUrl : repoUrl)).text();
|
203
|
+
const json = text.startsWith('---') || text.startsWith('%YAML') ? jsYaml.loadAll(text)[0] : JSON.parse(text);
|
204
|
+
if(Array.isArray(json.include)){
|
205
|
+
for(let i of json.include){
|
206
|
+
json.packages = {
|
207
|
+
...json.packages,
|
208
|
+
...((await this.getRepoJson(i.startsWith('.') ? path.join(path.dirname(repoUrl), i) : i)).packages || {})
|
209
|
+
};
|
210
|
+
}
|
211
|
+
}
|
212
|
+
return json;
|
213
|
+
} catch(e){
|
214
|
+
return {};
|
215
|
+
}
|
216
|
+
},
|
217
|
+
async fromRepo(repoAndPkg){
|
218
|
+
const [repo, pkg] = repoAndPkg.slice(1).split('/');
|
219
|
+
const repoUrl = this.findRepo(repo);
|
220
|
+
if(!repoUrl){
|
221
|
+
log(`Repository "${repo}" not found.`);
|
222
|
+
return log(`Add with "rew repo add ${repo} URL"`, ':end');
|
223
|
+
} else {
|
224
|
+
const repoJson = await this.getRepoJson(repoUrl);
|
225
|
+
if(repoJson?.packages?.[pkg]){
|
226
|
+
await this.installAppFrom(repoJson.packages[pkg]);
|
227
|
+
} else {
|
228
|
+
log(`Package "${pkg}" is not in repo "${repo}"`, ":end");
|
229
|
+
}
|
230
|
+
}
|
175
231
|
},
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
232
|
+
async repo(command, key, value) {
|
233
|
+
const confInstance = conf({}).create('').optionCenter('repos') || {};
|
234
|
+
|
235
|
+
if (command === 'add' || command === 'set') {
|
236
|
+
confInstance.set(key, value.replace('https://', '//').replace('http://', '//.'));
|
237
|
+
} else if (command === 'get') {
|
238
|
+
if (key) {
|
239
|
+
console.log(confInstance.get(key) || 'Not found');
|
240
|
+
} else {
|
241
|
+
console.log(Object.keys(confInstance.getAll()).join('\n'));
|
242
|
+
}
|
243
|
+
} else if (command === 'view') {
|
244
|
+
if (key) {
|
245
|
+
const url = confInstance.get(key) || {};
|
246
|
+
if(!url) return log('Repo not found', ':end');
|
247
|
+
const json = await this.getRepoJson(url);
|
248
|
+
if(json.name) log(json.name);
|
249
|
+
log('Packages:')
|
250
|
+
if(json.packages) Object.keys(json.packages).forEach(name => log(name)) || log(`${Object.keys(json.packages).length} Packages in ${key}`, ':end');
|
251
|
+
else log('none', ':end')
|
252
|
+
} else {
|
253
|
+
console.log(Object.keys(repos).join('\n'));
|
254
|
+
}
|
255
|
+
} else if (command === 'delete') {
|
256
|
+
confInstance.remove('repos');
|
257
|
+
} else {
|
258
|
+
log('Invalid command', ':end');
|
259
|
+
}
|
260
|
+
},
|
261
|
+
initFirst(){
|
262
|
+
conf({}).create('').optionCenter('repos').set('rewpkgs', '//raw.githubusercontent.com/kevinJ045/rewpkgs/main/main.yaml');
|
263
|
+
}
|
264
|
+
};
|
package/lib/rew/const/default.js
CHANGED
@@ -1,42 +1,45 @@
|
|
1
|
-
const { cenum } = require(
|
2
|
-
const { struct } = require(
|
3
|
-
const emitter = require(
|
4
|
-
const future = require(
|
5
|
-
const sleep = require(
|
6
|
-
const { match } = require(
|
7
|
-
const { map } = require(
|
8
|
-
const { typex, typeis, typedef, typei, int, float, num, str, bool } = require(
|
9
|
-
const { isEmpty, clone, deepClone, merge, uniqueId, compose, curry } = require(
|
10
|
-
const { print, input } = require(
|
1
|
+
const { cenum } = require('../models/enum');
|
2
|
+
const { struct } = require('../models/struct');
|
3
|
+
const emitter = require('../functions/emitter');
|
4
|
+
const future = require('../functions/future');
|
5
|
+
const sleep = require('../functions/sleep');
|
6
|
+
const { match } = require('../functions/match');
|
7
|
+
const { map } = require('../functions/map');
|
8
|
+
const { typex, typeis, typedef, typei, int, float, num, str, bool } = require('../functions/types');
|
9
|
+
const { isEmpty, clone, deepClone, merge, uniqueId, compose, curry } = require('../functions/core');
|
10
|
+
const { print, input } = require('../functions/stdout');
|
11
|
+
const { curl } = require('../functions/curl');
|
11
12
|
|
12
13
|
module.exports = {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
cenum,
|
15
|
+
struct,
|
16
|
+
future,
|
17
|
+
emitter,
|
18
|
+
sleep,
|
19
|
+
match,
|
20
|
+
map,
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
typex,
|
23
|
+
typei,
|
24
|
+
typeis,
|
25
|
+
typedef,
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
int,
|
28
|
+
float,
|
29
|
+
num,
|
30
|
+
str,
|
31
|
+
bool,
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
isEmpty,
|
34
|
+
clone,
|
35
|
+
deepClone,
|
36
|
+
merge,
|
37
|
+
uniqueId,
|
38
|
+
compose,
|
39
|
+
curry,
|
39
40
|
|
40
|
-
|
41
|
-
|
41
|
+
curl,
|
42
|
+
|
43
|
+
print,
|
44
|
+
input,
|
42
45
|
};
|
package/lib/rew/const/files.js
CHANGED
@@ -2,14 +2,14 @@ const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
3
3
|
|
4
4
|
const HOME_PATH = path.resolve(process.env.HOME, '.config/rew/default');
|
5
|
-
const THEME_PATH = module.exports.THEME_PATH = path.resolve(HOME_PATH, 'theme.css');
|
5
|
+
const THEME_PATH = (module.exports.THEME_PATH = path.resolve(HOME_PATH, 'theme.css'));
|
6
6
|
|
7
7
|
module.exports.FILES = [
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
]
|
8
|
+
{
|
9
|
+
path: HOME_PATH,
|
10
|
+
},
|
11
|
+
{
|
12
|
+
path: THEME_PATH,
|
13
|
+
content: fs.readFileSync(path.resolve(__dirname, '../css/theme.css')),
|
14
|
+
},
|
15
|
+
];
|
package/lib/rew/const/opt.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
const execOptions = {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
2
|
+
sharedContext: true,
|
3
|
+
resolveExtensions: [{ ext: '.js', options: { type: 'js' } }, '.coffee'],
|
4
|
+
nativeRequire: false,
|
5
|
+
cwdAlias: '$',
|
6
|
+
jsxPragma: 'createElement',
|
7
|
+
jsx: false,
|
8
|
+
};
|
9
9
|
|
10
|
-
module.exports.execOptions = execOptions;
|
10
|
+
module.exports.execOptions = execOptions;
|
package/lib/rew/css/theme.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
body {
|
2
|
-
|
3
|
-
}
|
2
|
+
background-color: #1c2541;
|
3
|
+
}
|