flowershow 0.0.2 → 0.0.3
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/README.md +7 -0
- package/commands/build.js +12 -0
- package/commands/create.js +12 -0
- package/commands/publish.js +12 -0
- package/commands/upgrade.js +12 -0
- package/index.js +39 -0
- package/package.json +16 -3
- package/upgrade.sh +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const log = console.log;
|
|
5
|
+
|
|
6
|
+
export default function build () {
|
|
7
|
+
log(chalk.redBright.bold('Command under construction...\n'));
|
|
8
|
+
log(chalk.blue(
|
|
9
|
+
'Check ' +
|
|
10
|
+
chalk.green.underline('https://flowershow.app') +
|
|
11
|
+
' to learn more about Flowershow development stage and subscribe to get notified when it\'s ready!'))
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const log = console.log;
|
|
5
|
+
|
|
6
|
+
export default function create () {
|
|
7
|
+
log(chalk.redBright.bold('Command under construction...\n'));
|
|
8
|
+
log(chalk.blue(
|
|
9
|
+
'Check ' +
|
|
10
|
+
chalk.green.underline('https://flowershow.app') +
|
|
11
|
+
' to learn more about Flowershow development stage and subscribe to get notified when it\'s ready!'))
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const log = console.log;
|
|
5
|
+
|
|
6
|
+
export default function publish (path, { glob }) {
|
|
7
|
+
log(chalk.redBright.bold('Command under construction...\n'));
|
|
8
|
+
log(chalk.blue(
|
|
9
|
+
'Check ' +
|
|
10
|
+
chalk.green.underline('https://flowershow.app') +
|
|
11
|
+
' to learn more about Flowershow development stage and subscribe to get notified when it\'s ready!'))
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const log = console.log;
|
|
5
|
+
|
|
6
|
+
export default function upgrade () {
|
|
7
|
+
log(chalk.redBright.bold('Command under construction...\n'));
|
|
8
|
+
log(chalk.blue(
|
|
9
|
+
'Check ' +
|
|
10
|
+
chalk.green.underline('https://flowershow.app') +
|
|
11
|
+
' to learn more about Flowershow development stage and subscribe to get notified when it\'s ready!'))
|
|
12
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
|
|
5
|
+
import publish from './commands/publish.js';
|
|
6
|
+
import create from './commands/create.js';
|
|
7
|
+
import build from './commands/build.js';
|
|
8
|
+
import upgrade from './commands/upgrade.js';
|
|
9
|
+
|
|
10
|
+
const program = new Command();
|
|
11
|
+
|
|
12
|
+
program
|
|
13
|
+
.name('flowershow')
|
|
14
|
+
.description('(Package under development)\nCLI tool for creating, publishing and upgrading Flowershow apps')
|
|
15
|
+
.version('0.0.1');
|
|
16
|
+
|
|
17
|
+
program
|
|
18
|
+
.command('publish')
|
|
19
|
+
.description('Publish files or directories')
|
|
20
|
+
.argument('[path]', 'path to a file or a directory', '.')
|
|
21
|
+
.option('-g, --glob <pattern>', 'glob pattern')
|
|
22
|
+
.action(publish);
|
|
23
|
+
|
|
24
|
+
program
|
|
25
|
+
.command('create')
|
|
26
|
+
.description('Create a new app template')
|
|
27
|
+
.action(create);
|
|
28
|
+
|
|
29
|
+
program
|
|
30
|
+
.command('build')
|
|
31
|
+
.description('Build Flowershow website')
|
|
32
|
+
.action(build);
|
|
33
|
+
|
|
34
|
+
program
|
|
35
|
+
.command('upgrade')
|
|
36
|
+
.description('Upgrade your Flowershow template to the latest version')
|
|
37
|
+
.action(upgrade);
|
|
38
|
+
|
|
39
|
+
program.parse();
|
package/package.json
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowershow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=14.16"
|
|
6
|
+
},
|
|
4
7
|
"author": "Rufus Pollock",
|
|
5
8
|
"description": "Publish your digital garden",
|
|
9
|
+
"keywords": ["markdown", "MDX", "mdx", "publish", "obsidian"],
|
|
10
|
+
"exports": "./index.js",
|
|
11
|
+
"bin": "./index.js",
|
|
6
12
|
"scripts": {
|
|
7
13
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
14
|
},
|
|
9
15
|
"repository": {
|
|
10
16
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/flowershow/flowershow
|
|
17
|
+
"url": "git+https://github.com/flowershow/flowershow",
|
|
18
|
+
"directory": "packages/flowershow"
|
|
12
19
|
},
|
|
13
20
|
"license": "MIT",
|
|
14
21
|
"bugs": {
|
|
15
22
|
"url": "https://github.com/flowershow/flowershow/issues"
|
|
16
23
|
},
|
|
17
|
-
"homepage": "https://github.com/flowershow/flowershow#readme"
|
|
24
|
+
"homepage": "https://github.com/flowershow/flowershow#readme",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"chalk": "^4.1.2",
|
|
27
|
+
"commander": "^9.4.0",
|
|
28
|
+
"inquirer": "^9.1.1"
|
|
29
|
+
},
|
|
30
|
+
"type": "module"
|
|
18
31
|
}
|
package/upgrade.sh
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# upgrade an existing standard nextjs site
|
|
2
|
+
|
|
3
|
+
npx degit flowershow/flowershow/templates/default --force
|
|
4
|
+
|
|
5
|
+
# files that we should keep the original (probably)
|
|
6
|
+
git checkout README.md
|
|
7
|
+
git checkout .gitignore
|
|
8
|
+
|
|
9
|
+
# stuff that shouldn't be there
|
|
10
|
+
rm .env.example
|
|
11
|
+
rm -Rf tests
|
|
12
|
+
rm netlify.toml
|
|
13
|
+
rm netlify.toml
|
|
14
|
+
# data seems to be exampleData
|
|
15
|
+
rm -Rf data
|
|
16
|
+
rm -Rf components/TempCallout.jsx
|
|
17
|
+
|
|
18
|
+
# set up custom components
|
|
19
|
+
rm -Rf components/custom
|
|
20
|
+
|
|
21
|
+
# set up assets
|
|
22
|
+
mkdir -p content/assets
|
|
23
|
+
rm public/assets
|
|
24
|
+
ln -s content/assets public/assets
|
|
25
|
+
|
|
26
|
+
# notes
|
|
27
|
+
echo "You may need to hand merge the following files:"
|
|
28
|
+
echo "pacakge.json, package-lock.json"
|