@raisenow/tamaro-cli 1.0.5 → 1.0.9

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.
@@ -1,32 +0,0 @@
1
- import {commandSync} from 'execa'
2
- import {logCommand, resolveOwn} from 'lib/helpers'
3
- import resolveBin from 'resolve-bin'
4
-
5
- ///////////////////////////////////////////////////////////////////////////////
6
-
7
- export type DevOptions = {
8
- localCore?: boolean
9
- }
10
-
11
- ///////////////////////////////////////////////////////////////////////////////
12
-
13
- const prepareDevFlags = (options: DevOptions): string => {
14
- const {localCore} = options
15
- let flags: string[] = []
16
-
17
- flags = localCore ? [...flags, '--env localCore'] : flags
18
-
19
- return flags.join(' ')
20
- }
21
-
22
- ///////////////////////////////////////////////////////////////////////////////
23
-
24
- export const dev = async (options: DevOptions): Promise<void> => {
25
- const flags = prepareDevFlags(options)
26
-
27
- const wpBin = resolveBin.sync('webpack')
28
- const wpConfig = resolveOwn('dist/webpack.config.js')
29
- const cmd = `${wpBin} serve --config ${wpConfig} ${flags}`
30
- logCommand(cmd)
31
- commandSync(cmd, {stdio: 'inherit'})
32
- }
@@ -1,12 +0,0 @@
1
- import {commandSync} from 'execa'
2
- import {getIfCoreFns, getPaths, logCommand} from 'lib/helpers'
3
-
4
- ///////////////////////////////////////////////////////////////////////////////
5
-
6
- export const serve = async (): Promise<void> => {
7
- const {ifCore} = getIfCoreFns()
8
- const paths = getPaths(ifCore)
9
- const cmd = `npx http-server ${paths.appDist} --cors`
10
- logCommand(cmd)
11
- commandSync(cmd, {stdio: 'inherit'})
12
- }