jizy-packer 2.1.26 → 2.1.27

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.
@@ -24,8 +24,12 @@ main {
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  align-items: center;
27
- justify-content: center;
28
- padding-top: 80px;
27
+ }
28
+
29
+ main>article {
30
+ background-color: rgba(255, 255, 255, .2);
31
+ padding: 10px 20px;
32
+ max-width: 800px;
29
33
  }
30
34
 
31
35
  .buttons {
@@ -67,4 +71,4 @@ main {
67
71
  width: 1px;
68
72
  height: 1px;
69
73
  overflow: hidden;
70
- }
74
+ }
@@ -16,7 +16,10 @@
16
16
 
17
17
  <body>
18
18
  <main>
19
- <h1>%MODULE_NAME% example page</h1>
19
+ <article>
20
+ <h1>%MODULE_NAME% example page</h1>
21
+ <p>This is an example page for the %MODULE_NAME% module.</p>
22
+ </article>
20
23
  </main>
21
24
  <script src="js/%MODULE_ALIAS%.min.js"></script>
22
25
  <script src="js/main.js"></script>
@@ -9,7 +9,7 @@ import {
9
9
  } from 'jizy-packer';
10
10
 
11
11
  const jPackData = function () {
12
- const lessBuildVariablesPath = path.join(jPackConfig.get('basePath'), 'lib/less / _variables.less');
12
+ const lessBuildVariablesPath = path.join(jPackConfig.get('basePath'), 'lib/less/_variables.less');
13
13
 
14
14
  jPackConfig.sets({
15
15
  name: '%MODULE_NAME%',
File without changes
@@ -1,33 +1,33 @@
1
- {
2
- "name": "%MODULE_ALIAS%",
3
- "version": "1.0.0",
4
- "browser": "dist/js/%MODULE_ALIAS%.min.js",
5
- "main": "lib/index.js",
6
- "type": "module",
7
- "jizy": "dist/",
8
- "files": [
9
- "dist/*",
10
- "lib/*"
11
- ],
12
- "scripts": {
13
- "jpack:export": "node ./cli/jpack.js --action build --name perso",
14
- "jpack:export-debug": "node ./cli/jpack.js --action build --name perso --debug",
15
- "jpack:dist": "node ./cli/jpack.js",
16
- "jpack:dist-debug": "node ./cli/jpack.js --debug"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/joffreydemetz/%MODULE_ALIAS%.git"
21
- },
22
- "keywords": [
23
- "jdz",
24
- "jizy"
25
- ],
26
- "author": "Joffrey Demetz <joffrey.demetz@gmail.com> (https://joffreydemetz.com/)",
27
- "license": "MIT",
28
- "description": "",
29
- "dependencies": {
30
- "jizy-packer": "^2.1.0",
31
- "less": "^4.4.1"
32
- }
1
+ {
2
+ "name": "%MODULE_ALIAS%",
3
+ "version": "1.0.0",
4
+ "browser": "dist/js/%MODULE_ALIAS%.min.js",
5
+ "main": "lib/index.js",
6
+ "type": "module",
7
+ "jizy": "dist/",
8
+ "files": [
9
+ "dist/*",
10
+ "lib/*"
11
+ ],
12
+ "scripts": {
13
+ "jpack:export": "node ./cli/jpack.js --action build --name perso",
14
+ "jpack:export-debug": "node ./cli/jpack.js --action build --name perso --debug",
15
+ "jpack:dist": "node ./cli/jpack.js",
16
+ "jpack:dist-debug": "node ./cli/jpack.js --debug"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/joffreydemetz/%MODULE_ALIAS%.git"
21
+ },
22
+ "keywords": [
23
+ "jdz",
24
+ "jizy"
25
+ ],
26
+ "author": "Joffrey Demetz <joffrey.demetz@gmail.com> (https://joffreydemetz.com/)",
27
+ "license": "MIT",
28
+ "description": "",
29
+ "dependencies": {
30
+ "jizy-packer": "^2.1.0",
31
+ "less": "^4.4.1"
32
+ }
33
33
  }
package/cli/init.js CHANGED
@@ -3,7 +3,7 @@ import path from "path";
3
3
  import readline from "readline";
4
4
  import { fileURLToPath } from "url";
5
5
 
6
- function copyAndReplace(srcDir, destDir, replacements) {
6
+ function copyDefaultFiles(srcDir, destDir, replacements) {
7
7
  const entries = fs.readdirSync(srcDir, { withFileTypes: true });
8
8
  console.dir(entries.map(e => e.name));
9
9
 
@@ -69,4 +69,10 @@ const destDir = process.cwd();
69
69
 
70
70
  console.log(srcDir);
71
71
  console.log(destDir);
72
- copyAndReplace(srcDir, destDir, answers);
72
+ copyDefaultFiles(srcDir, destDir, answers);
73
+
74
+ // add an empty js file to start with
75
+ const mainJs = path.join(destDir, moduleName + '.js');
76
+ if (!fs.existsSync(mainJs)) {
77
+ fs.writeFileSync(mainJs, '', 'utf8');
78
+ }
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "jizy-packer",
3
- "version": "2.1.26",
4
- "type": "module",
5
- "files": [
6
- "_example",
7
- "_package",
8
- "cli/init.js",
9
- "lib/*.js"
10
- ],
11
- "main": "lib/index.js",
12
- "repository": {
13
- "type": "git",
14
- "url": "git+https://github.com/joffreydemetz/jizy-packer.git"
15
- },
16
- "keywords": [
17
- "jizy",
18
- "packer",
19
- "utilities"
20
- ],
21
- "author": "Joffrey Demetz <joffrey.demetz@gmail.com> (https://joffreydemetz.com/)",
22
- "license": "MIT",
23
- "description": "CLI app to generate optimized builds.",
24
- "dependencies": {
25
- "@rollup/plugin-commonjs": "^28.0.3",
26
- "@rollup/plugin-json": "^6.1.0",
27
- "@rollup/plugin-node-resolve": "^16.0.1",
28
- "@rollup/plugin-terser": "^0.4.4",
29
- "@rollup/plugin-url": "^8.0.2",
30
- "postcss": "^8.5.3",
31
- "rollup": "^4.40.1",
32
- "rollup-plugin-postcss": "^4.0.2",
33
- "yargs": "^17.7.2"
34
- }
1
+ {
2
+ "name": "jizy-packer",
3
+ "version": "2.1.27",
4
+ "type": "module",
5
+ "files": [
6
+ "_example",
7
+ "_package",
8
+ "cli/init.js",
9
+ "lib/*.js"
10
+ ],
11
+ "main": "lib/index.js",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/joffreydemetz/jizy-packer.git"
15
+ },
16
+ "keywords": [
17
+ "jizy",
18
+ "packer",
19
+ "utilities"
20
+ ],
21
+ "author": "Joffrey Demetz <joffrey.demetz@gmail.com> (https://joffreydemetz.com/)",
22
+ "license": "MIT",
23
+ "description": "CLI app to generate optimized builds.",
24
+ "dependencies": {
25
+ "@rollup/plugin-commonjs": "^28.0.3",
26
+ "@rollup/plugin-json": "^6.1.0",
27
+ "@rollup/plugin-node-resolve": "^16.0.1",
28
+ "@rollup/plugin-terser": "^0.4.4",
29
+ "@rollup/plugin-url": "^8.0.2",
30
+ "postcss": "^8.5.3",
31
+ "rollup": "^4.40.1",
32
+ "rollup-plugin-postcss": "^4.0.2",
33
+ "yargs": "^17.7.2"
34
+ }
35
35
  }