create-next2d-app 1.0.9 → 1.2.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/index.js +15 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"use strict";
|
|
4
4
|
|
|
5
5
|
const version = process.versions.node;
|
|
6
|
-
if (
|
|
6
|
+
if (15 > version.split(".")[0]) {
|
|
7
7
|
console.error(
|
|
8
8
|
"You are running Node Version:" + version + ".\n" +
|
|
9
|
-
"Create Next2d App requires Node
|
|
9
|
+
"Create Next2d App requires Node 15 or higher. \n" +
|
|
10
10
|
"Please update your version of Node."
|
|
11
11
|
);
|
|
12
12
|
process.exit(1);
|
|
@@ -323,11 +323,13 @@ const createApp = function (app_name, template = "@next2d/framework-template")
|
|
|
323
323
|
path.join(root, "package.json"),
|
|
324
324
|
JSON.stringify({
|
|
325
325
|
"name": appName,
|
|
326
|
-
"
|
|
326
|
+
"description": `Details of ${appName}`,
|
|
327
|
+
"version": "0.0.1",
|
|
327
328
|
"private": true,
|
|
329
|
+
"main": "src/index.js",
|
|
328
330
|
"scripts": {
|
|
329
331
|
"start": "webpack serve",
|
|
330
|
-
"build": "
|
|
332
|
+
"build": "npx @next2d/builder",
|
|
331
333
|
"lint": "eslint src/**/*.js",
|
|
332
334
|
"test": "npx jest",
|
|
333
335
|
"generate": "npx @next2d/view-generator"
|
|
@@ -355,6 +357,7 @@ const createApp = function (app_name, template = "@next2d/framework-template")
|
|
|
355
357
|
const ignoreList = [
|
|
356
358
|
"node_modules",
|
|
357
359
|
"coverage",
|
|
360
|
+
"dist",
|
|
358
361
|
".DS_Store",
|
|
359
362
|
".idea",
|
|
360
363
|
"Thumbs.db",
|
|
@@ -362,7 +365,8 @@ const createApp = function (app_name, template = "@next2d/framework-template")
|
|
|
362
365
|
"yarn-debug.log*",
|
|
363
366
|
"yarn-error.log*",
|
|
364
367
|
"src/config/Config.js",
|
|
365
|
-
"src/Packages.js"
|
|
368
|
+
"src/Packages.js",
|
|
369
|
+
"electron.index.json"
|
|
366
370
|
];
|
|
367
371
|
|
|
368
372
|
fs.writeFileSync(
|
|
@@ -375,13 +379,18 @@ const createApp = function (app_name, template = "@next2d/framework-template")
|
|
|
375
379
|
"@next2d/framework",
|
|
376
380
|
"@next2d/webpack-auto-loader-plugin",
|
|
377
381
|
"@next2d/env",
|
|
382
|
+
"electron",
|
|
378
383
|
"webpack",
|
|
379
384
|
"webpack-cli",
|
|
380
385
|
"webpack-dev-server",
|
|
381
386
|
"@babel/core",
|
|
382
387
|
"@babel/preset-env",
|
|
383
388
|
"eslint",
|
|
384
|
-
"eslint-webpack-plugin"
|
|
389
|
+
"eslint-webpack-plugin",
|
|
390
|
+
"@capacitor/cli",
|
|
391
|
+
"@capacitor/core",
|
|
392
|
+
"@capacitor/ios",
|
|
393
|
+
"@capacitor/android"
|
|
385
394
|
]);
|
|
386
395
|
};
|
|
387
396
|
|