ultimate-jekyll-manager 0.0.274 → 0.0.276

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/dist/cli.js CHANGED
@@ -13,6 +13,7 @@ const ALIASES = {
13
13
  install: ['-i', 'i', '--install'],
14
14
  setup: ['-s', '--setup'],
15
15
  version: ['-v', '--version'],
16
+ deploy: ['-d', '--deploy'],
16
17
  // Tasks
17
18
  audit: ['-a', '--audit'],
18
19
  translation: ['-t', '--translation'],
@@ -0,0 +1,26 @@
1
+ // Libraries
2
+ const Manager = new (require('../build.js'));
3
+ const logger = Manager.logger('deploy');
4
+ const { execute } = require('node-powertools');
5
+ const jetpack = require('fs-jetpack');
6
+ const path = require('path');
7
+
8
+ // Load package
9
+ const project = Manager.getPackage('project');
10
+
11
+ module.exports = async function (options) {
12
+ options = options || {};
13
+
14
+ // Check for local packages
15
+ const allDeps = JSON.stringify(project.dependencies || {}) + JSON.stringify(project.devDependencies || {});
16
+
17
+ if (allDeps.includes('file:')) {
18
+ throw new Error('Please remove local packages before deploying!');
19
+ }
20
+
21
+ // Build
22
+ await execute('npm run build', { log: true });
23
+
24
+ // Deploy
25
+ await execute(`npu sync --message='Deploy'`, { log: true });
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.274",
3
+ "version": "0.0.276",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -30,7 +30,7 @@
30
30
  "start": "npx uj clean && npx uj setup && bundle exec npm run gulp --",
31
31
  "gulp": "gulp --cwd ./ --gulpfile ./node_modules/ultimate-jekyll-manager/dist/gulp/main.js",
32
32
  "build": "npx uj clean && npx uj setup && UJ_BUILD_MODE=true bundle exec npm run gulp -- build",
33
- "deploy": "npm run build && npu sync --message='Deploy'"
33
+ "deploy": "npx uj deploy"
34
34
  },
35
35
  "engines": {
36
36
  "node": "22",