@xylabs/ts-scripts-react-yarn3 2.5.120 → 2.5.123
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/cjs/actions/clean.d.ts +3 -0
- package/dist/cjs/actions/clean.d.ts.map +1 -0
- package/dist/cjs/actions/clean.js +14 -0
- package/dist/cjs/actions/clean.js.map +1 -0
- package/dist/cjs/actions/deps.d.ts +2 -0
- package/dist/cjs/actions/deps.d.ts.map +1 -0
- package/dist/cjs/actions/deps.js +9 -0
- package/dist/cjs/actions/deps.js.map +1 -0
- package/dist/cjs/actions/index.d.ts +3 -0
- package/dist/cjs/actions/index.d.ts.map +1 -0
- package/dist/cjs/actions/index.js +6 -0
- package/dist/cjs/actions/index.js.map +1 -0
- package/dist/cjs/analyze.js +2 -2
- package/dist/cjs/analyze.js.map +1 -1
- package/dist/cjs/build-ci.js +2 -2
- package/dist/cjs/build-ci.js.map +1 -1
- package/dist/cjs/build.js +2 -2
- package/dist/cjs/build.js.map +1 -1
- package/dist/cjs/clean.js +2 -4
- package/dist/cjs/clean.js.map +1 -1
- package/dist/cjs/compile-cjs.js +0 -0
- package/dist/cjs/compile-esm.js +0 -0
- package/dist/cjs/compile.js +0 -0
- package/dist/cjs/copy-images-cjs.js +0 -0
- package/dist/cjs/copy-images-esm.js +0 -0
- package/dist/cjs/copy-images.js +0 -0
- package/dist/cjs/copy-styles-cjs.js +0 -0
- package/dist/cjs/copy-styles-esm.js +0 -0
- package/dist/cjs/copy-styles.js +0 -0
- package/dist/cjs/cycle.js +2 -3
- package/dist/cjs/cycle.js.map +1 -1
- package/dist/cjs/dead.js +2 -2
- package/dist/cjs/dead.js.map +1 -1
- package/dist/cjs/deploy-major.js +0 -0
- package/dist/cjs/deploy-minor.js +0 -0
- package/dist/cjs/deploy.js +0 -0
- package/dist/cjs/deps.js +2 -4
- package/dist/cjs/deps.js.map +1 -1
- package/dist/cjs/eject.js +2 -2
- package/dist/cjs/eject.js.map +1 -1
- package/dist/cjs/fix.js +2 -2
- package/dist/cjs/fix.js.map +1 -1
- package/dist/cjs/gen-docs.js +2 -22
- package/dist/cjs/gen-docs.js.map +1 -1
- package/dist/cjs/gitlint-fix.js +2 -22
- package/dist/cjs/gitlint-fix.js.map +1 -1
- package/dist/cjs/gitlint.js +2 -45
- package/dist/cjs/gitlint.js.map +1 -1
- package/dist/cjs/license.js +2 -21
- package/dist/cjs/license.js.map +1 -1
- package/dist/cjs/lint-clean.js +2 -5
- package/dist/cjs/lint-clean.js.map +1 -1
- package/dist/cjs/lint-fast.js +2 -5
- package/dist/cjs/lint-fast.js.map +1 -1
- package/dist/cjs/lint-profile.js +2 -2
- package/dist/cjs/lint-profile.js.map +1 -1
- package/dist/cjs/lint.js +2 -2
- package/dist/cjs/lint.js.map +1 -1
- package/dist/cjs/rebuild.js +2 -5
- package/dist/cjs/rebuild.js.map +1 -1
- package/dist/cjs/reinstall.js +2 -6
- package/dist/cjs/reinstall.js.map +1 -1
- package/dist/cjs/relint.js +2 -2
- package/dist/cjs/relint.js.map +1 -1
- package/dist/cjs/sitemap.js +2 -2
- package/dist/cjs/sitemap.js.map +1 -1
- package/dist/cjs/sonar.js +2 -2
- package/dist/cjs/sonar.js.map +1 -1
- package/dist/cjs/start.js +2 -2
- package/dist/cjs/start.js.map +1 -1
- package/dist/cjs/test.js +2 -2
- package/dist/cjs/test.js.map +1 -1
- package/dist/cjs/up.js +2 -2
- package/dist/cjs/up.js.map +1 -1
- package/dist/cjs/updo.js +2 -6
- package/dist/cjs/updo.js.map +1 -1
- package/dist/cjs/yarn3only.js +2 -7
- package/dist/cjs/yarn3only.js.map +1 -1
- package/dist/esm/actions/clean.d.ts +3 -0
- package/dist/esm/actions/clean.d.ts.map +1 -0
- package/dist/esm/actions/clean.js +10 -0
- package/dist/esm/actions/clean.js.map +1 -0
- package/dist/esm/actions/deps.d.ts +2 -0
- package/dist/esm/actions/deps.d.ts.map +1 -0
- package/dist/esm/actions/deps.js +5 -0
- package/dist/esm/actions/deps.js.map +1 -0
- package/dist/esm/actions/index.d.ts +3 -0
- package/dist/esm/actions/index.d.ts.map +1 -0
- package/dist/esm/actions/index.js +3 -0
- package/dist/esm/actions/index.js.map +1 -0
- package/dist/esm/analyze.js +1 -1
- package/dist/esm/analyze.js.map +1 -1
- package/dist/esm/build-ci.js +1 -1
- package/dist/esm/build-ci.js.map +1 -1
- package/dist/esm/build.js +1 -1
- package/dist/esm/build.js.map +1 -1
- package/dist/esm/clean.js +2 -4
- package/dist/esm/clean.js.map +1 -1
- package/dist/esm/cycle.js +2 -3
- package/dist/esm/cycle.js.map +1 -1
- package/dist/esm/dead.js +2 -2
- package/dist/esm/dead.js.map +1 -1
- package/dist/esm/deps.js +2 -4
- package/dist/esm/deps.js.map +1 -1
- package/dist/esm/eject.js +1 -1
- package/dist/esm/eject.js.map +1 -1
- package/dist/esm/fix.js +2 -2
- package/dist/esm/fix.js.map +1 -1
- package/dist/esm/gen-docs.js +2 -22
- package/dist/esm/gen-docs.js.map +1 -1
- package/dist/esm/gitlint-fix.js +2 -21
- package/dist/esm/gitlint-fix.js.map +1 -1
- package/dist/esm/gitlint.js +2 -44
- package/dist/esm/gitlint.js.map +1 -1
- package/dist/esm/license.js +2 -21
- package/dist/esm/license.js.map +1 -1
- package/dist/esm/lint-clean.js +2 -5
- package/dist/esm/lint-clean.js.map +1 -1
- package/dist/esm/lint-fast.js +2 -4
- package/dist/esm/lint-fast.js.map +1 -1
- package/dist/esm/lint-profile.js +2 -2
- package/dist/esm/lint-profile.js.map +1 -1
- package/dist/esm/lint.js +2 -2
- package/dist/esm/lint.js.map +1 -1
- package/dist/esm/rebuild.js +2 -5
- package/dist/esm/rebuild.js.map +1 -1
- package/dist/esm/reinstall.js +2 -6
- package/dist/esm/reinstall.js.map +1 -1
- package/dist/esm/relint.js +2 -2
- package/dist/esm/relint.js.map +1 -1
- package/dist/esm/sitemap.js +1 -1
- package/dist/esm/sitemap.js.map +1 -1
- package/dist/esm/sonar.js +2 -2
- package/dist/esm/sonar.js.map +1 -1
- package/dist/esm/start.js +1 -1
- package/dist/esm/start.js.map +1 -1
- package/dist/esm/test.js +1 -1
- package/dist/esm/test.js.map +1 -1
- package/dist/esm/up.js +2 -2
- package/dist/esm/up.js.map +1 -1
- package/dist/esm/updo.js +2 -6
- package/dist/esm/updo.js.map +1 -1
- package/dist/esm/yarn3only.js +2 -7
- package/dist/esm/yarn3only.js.map +1 -1
- package/dist/tsconfig.build.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.build.esm.tsbuildinfo +1 -1
- package/package.json +5 -23
- package/src/actions/clean.ts +10 -0
- package/src/actions/deps.ts +5 -0
- package/src/actions/index.ts +2 -0
- package/src/analyze.ts +1 -1
- package/src/build-ci.ts +1 -1
- package/src/build.ts +1 -1
- package/src/clean.ts +2 -6
- package/src/cycle.ts +2 -4
- package/src/dead.ts +2 -2
- package/src/deps.ts +2 -11
- package/src/eject.ts +1 -1
- package/src/fix.ts +2 -2
- package/src/gitlint-fix.ts +2 -26
- package/src/gitlint.ts +2 -46
- package/src/license.ts +2 -29
- package/src/lint-clean.ts +2 -5
- package/src/lint-fast.ts +2 -6
- package/src/lint-profile.ts +2 -2
- package/src/lint.ts +2 -2
- package/src/rebuild.ts +2 -5
- package/src/reinstall.ts +2 -6
- package/src/relint.ts +2 -2
- package/src/sitemap.ts +1 -1
- package/src/sonar.ts +3 -2
- package/src/start.ts +1 -1
- package/src/test.ts +1 -1
- package/src/up.ts +2 -2
- package/src/updo.ts +2 -6
- package/src/yarn3only.ts +3 -7
- package/src/compile-cjs.ts +0 -9
- package/src/compile-esm.ts +0 -9
- package/src/compile.ts +0 -13
- package/src/copy-images-cjs.ts +0 -21
- package/src/copy-images-esm.ts +0 -21
- package/src/copy-images.ts +0 -8
- package/src/copy-styles-cjs.ts +0 -21
- package/src/copy-styles-esm.ts +0 -21
- package/src/copy-styles.ts +0 -8
- package/src/deploy-major.ts +0 -13
- package/src/deploy-minor.ts +0 -13
- package/src/deploy.ts +0 -13
- package/src/gen-docs.ts +0 -26
- package/src/lib/index.ts +0 -8
- package/src/lib/isYarnVersionOrGreater.ts +0 -16
- package/src/lib/processEx.ts +0 -28
- package/src/lib/runSteps.ts +0 -29
- package/src/lib/safeExit.ts +0 -13
- package/src/lib/withErrnoException.ts +0 -6
- package/src/lib/withError.ts +0 -8
- package/src/lib/yarnInitCwd.ts +0 -4
- package/src/lib/yarnWorkspaces.ts +0 -21
package/src/analyze.ts
CHANGED
package/src/build-ci.ts
CHANGED
package/src/build.ts
CHANGED
package/src/clean.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { clean } from './actions'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const steps = workspaces.map<ScriptStep>(({ location }) => ['./node_modules/rimraf/bin.js', ['-q', `${location}/dist`]])
|
|
7
|
-
|
|
8
|
-
runSteps('Deps', steps)
|
|
4
|
+
clean()
|
package/src/cycle.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { cycle } from '@xylabs/ts-scripts-yarn3'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
runSteps('Cycle', [['node', ['./node_modules/eslint/bin/eslint.js', ...rules.map((rule) => ['--rule', rule]).flat(), '--cache', '.']]])
|
|
5
|
+
cycle()
|
package/src/dead.ts
CHANGED
package/src/deps.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { deps } from './actions'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const steps = workspaces.map<ScriptStep>(({ location }) => ['node', ['./node_modules/depcheck/bin/depcheck.js', `${location}/.`]])
|
|
8
|
-
|
|
9
|
-
runSteps(
|
|
10
|
-
'Deps',
|
|
11
|
-
steps,
|
|
12
|
-
false,
|
|
13
|
-
workspaces.map(({ name }) => name),
|
|
14
|
-
)
|
|
5
|
+
deps()
|
package/src/eject.ts
CHANGED
package/src/fix.ts
CHANGED
package/src/gitlint-fix.ts
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk'
|
|
3
|
-
import { execSync } from 'child_process'
|
|
4
|
-
import { sync } from 'parse-git-config'
|
|
5
2
|
|
|
6
|
-
import {
|
|
3
|
+
import { gitlintFix } from '@xylabs/ts-scripts-yarn3'
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
console.log(`\nGitlint Fix Start [${process.cwd()}]\n`)
|
|
10
|
-
|
|
11
|
-
const gitConfig = sync()
|
|
12
|
-
|
|
13
|
-
if (gitConfig.core.ignorecase) {
|
|
14
|
-
execSync('git config core.ignorecase false', { stdio: 'inherit' })
|
|
15
|
-
console.warn(chalk.yellow('\nGitlint Fix: Updated core.ignorecase to be false\n'))
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (gitConfig.core.autocrlf !== false) {
|
|
19
|
-
execSync('git config core.autocrlf false', { stdio: 'inherit' })
|
|
20
|
-
console.warn(chalk.yellow('\nGitlint Fix: Updated core.autocrlf to be false\n'))
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (gitConfig.core.eol !== 'lf') {
|
|
24
|
-
execSync('git config core.eol lf', { stdio: 'inherit' })
|
|
25
|
-
console.warn(chalk.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'))
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return 1
|
|
29
|
-
})
|
|
5
|
+
gitlintFix()
|
package/src/gitlint.ts
CHANGED
|
@@ -1,49 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import chalk from 'chalk'
|
|
3
|
-
import { sync } from 'parse-git-config'
|
|
4
2
|
|
|
5
|
-
import {
|
|
3
|
+
import { gitlint } from '@xylabs/ts-scripts-yarn3'
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
console.log(`\nGitlint Start [${process.cwd()}]\n`)
|
|
9
|
-
let valid = 0
|
|
10
|
-
let warnings = 0
|
|
11
|
-
const errors = 0
|
|
12
|
-
const gitConfig = sync()
|
|
13
|
-
|
|
14
|
-
const warn = (message: string) => {
|
|
15
|
-
console.warn(chalk.yellow(`Warning: ${message}`))
|
|
16
|
-
warnings++
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (gitConfig.core.ignorecase) {
|
|
20
|
-
warn('Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]')
|
|
21
|
-
} else {
|
|
22
|
-
valid++
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (gitConfig.core.autocrlf !== false) {
|
|
26
|
-
warn('Please set core.autocrlf to FALSE in .git/config file [run yarn gitlint-fix]')
|
|
27
|
-
} else {
|
|
28
|
-
valid++
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (gitConfig.core.eol !== 'lf') {
|
|
32
|
-
warn('Please set core.eol to "lf" in .git/config file [run yarn gitlint-fix]')
|
|
33
|
-
} else {
|
|
34
|
-
valid++
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const resultMessages: string[] = []
|
|
38
|
-
if (valid > 0) {
|
|
39
|
-
resultMessages.push(chalk.green(`Passed: ${valid}`))
|
|
40
|
-
}
|
|
41
|
-
if (warnings > 0) {
|
|
42
|
-
resultMessages.push(chalk.yellow(`Warnings: ${warnings}`))
|
|
43
|
-
}
|
|
44
|
-
if (errors > 0) {
|
|
45
|
-
resultMessages.push(chalk.red(` Errors: ${errors}`))
|
|
46
|
-
}
|
|
47
|
-
console.warn(`Gitlint Finish [ ${resultMessages.join(' | ')} ]\n`)
|
|
48
|
-
return warnings + errors === 0 ? 1 : 0
|
|
49
|
-
})
|
|
5
|
+
gitlint()
|
package/src/license.ts
CHANGED
|
@@ -1,32 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { license } from '@xylabs/ts-scripts-yarn3'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const exclude: string[] = [
|
|
8
|
-
'MIT',
|
|
9
|
-
'ISC',
|
|
10
|
-
'Apache-2.0',
|
|
11
|
-
'BSD',
|
|
12
|
-
'BSD-2-Clause',
|
|
13
|
-
'CC-BY-4.0',
|
|
14
|
-
'Unlicense',
|
|
15
|
-
'CC-BY-3.0',
|
|
16
|
-
'CC0-1.0',
|
|
17
|
-
'LGPL-3.0-only',
|
|
18
|
-
'LGPL-3.0',
|
|
19
|
-
'LGPL-3.0-or-later',
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
const steps = workspaces.map<ScriptStep>(({ location }) => [
|
|
23
|
-
'node',
|
|
24
|
-
['./node_modules/license-checker/bin/license-checker', '--start', `./${location}`, '--exclude', `'${exclude.join(', ')}'`, '--production'],
|
|
25
|
-
])
|
|
26
|
-
|
|
27
|
-
runSteps(
|
|
28
|
-
'License',
|
|
29
|
-
steps,
|
|
30
|
-
false,
|
|
31
|
-
workspaces.map(({ name }) => name),
|
|
32
|
-
)
|
|
5
|
+
license()
|
package/src/lint-clean.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { lintClean } from '@xylabs/ts-scripts-yarn3'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
['node', ['./node_modules/rimraf/bin.js', '.eslintcache']],
|
|
7
|
-
['node', ['./node_modules/eslint/bin/eslint.js', '.', '--cache']],
|
|
8
|
-
])
|
|
5
|
+
lintClean()
|
package/src/lint-fast.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { lintFast } from '@xylabs/ts-scripts-yarn3'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
console.log(chalk.magenta("Deprected. Use 'yarn lint' instead"))
|
|
8
|
-
|
|
9
|
-
runSteps('Lint [Caching]', [['node', ['./node_modules/eslint/bin/eslint.js', '.', '--cache']]])
|
|
5
|
+
lintFast()
|
package/src/lint-profile.ts
CHANGED
package/src/lint.ts
CHANGED
package/src/rebuild.ts
CHANGED
package/src/reinstall.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { reinstall } from '@xylabs/ts-scripts-yarn3'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
['node', './node_modules/rimraf/bin.js ./yarn.lock'],
|
|
7
|
-
['node', './node_modules/rimraf/bin.js ./node_modules'],
|
|
8
|
-
['yarn', 'install --network-timeout 10000'],
|
|
9
|
-
])
|
|
5
|
+
reinstall()
|
package/src/relint.ts
CHANGED
package/src/sitemap.ts
CHANGED
package/src/sonar.ts
CHANGED
package/src/start.ts
CHANGED
package/src/test.ts
CHANGED
package/src/up.ts
CHANGED
package/src/updo.ts
CHANGED
package/src/yarn3only.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (!valid) {
|
|
7
|
-
processEx(`Invalid Yarn version [${version}]`)
|
|
8
|
-
}
|
|
9
|
-
})
|
|
3
|
+
import { yarn3Only } from '@xylabs/ts-scripts-yarn3'
|
|
4
|
+
|
|
5
|
+
yarn3Only()
|
package/src/compile-cjs.ts
DELETED
package/src/compile-esm.ts
DELETED
package/src/compile.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { runSteps } from './lib'
|
|
4
|
-
|
|
5
|
-
runSteps('Compile', [
|
|
6
|
-
['yarn', 'compile:esm'],
|
|
7
|
-
['yarn', 'compile:cjs'],
|
|
8
|
-
['yarn', 'copy-images:esm'],
|
|
9
|
-
['yarn', 'copy-images:cjs'],
|
|
10
|
-
['yarn', 'copy-styles:esm'],
|
|
11
|
-
['yarn', 'copy-styles:cjs'],
|
|
12
|
-
['yarn', 'deps'],
|
|
13
|
-
])
|
package/src/copy-images-cjs.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
import cpy from 'cpy'
|
|
5
|
-
|
|
6
|
-
import { yarnWorkspaces } from './lib'
|
|
7
|
-
|
|
8
|
-
const workspaces = yarnWorkspaces()
|
|
9
|
-
|
|
10
|
-
console.log(chalk.green('Copying Images [CJS]'))
|
|
11
|
-
|
|
12
|
-
workspaces.forEach(({ name, location }) => {
|
|
13
|
-
return cpy(['**/*.jpg', '**/*.png', '**/*.gif', '**/*.svg', '**/*.webp'], '../dist/cjs', {
|
|
14
|
-
cwd: `${process.cwd()}/${location}/src`,
|
|
15
|
-
parents: true,
|
|
16
|
-
})
|
|
17
|
-
.then((values) => values.forEach((value) => console.log(`Copied: ${value}`)))
|
|
18
|
-
.catch((reason) => {
|
|
19
|
-
console.log(`Copy Failed: ${name}: ${reason}`)
|
|
20
|
-
})
|
|
21
|
-
})
|
package/src/copy-images-esm.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
import cpy from 'cpy'
|
|
5
|
-
|
|
6
|
-
import { yarnWorkspaces } from './lib'
|
|
7
|
-
|
|
8
|
-
const workspaces = yarnWorkspaces()
|
|
9
|
-
|
|
10
|
-
console.log(chalk.green('Copying Images [ESM]'))
|
|
11
|
-
|
|
12
|
-
workspaces.forEach(({ name, location }) => {
|
|
13
|
-
return cpy(['**/*.jpg', '**/*.png', '**/*.gif', '**/*.svg', '**/*.webp'], '../dist/esm', {
|
|
14
|
-
cwd: `${process.cwd()}/${location}/src`,
|
|
15
|
-
parents: true,
|
|
16
|
-
})
|
|
17
|
-
.then((values) => values.forEach((value) => console.log(`Copied: ${value}`)))
|
|
18
|
-
.catch((reason) => {
|
|
19
|
-
console.log(`Copy Failed: ${name}: ${reason}`)
|
|
20
|
-
})
|
|
21
|
-
})
|
package/src/copy-images.ts
DELETED
package/src/copy-styles-cjs.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
import cpy from 'cpy'
|
|
5
|
-
|
|
6
|
-
import { yarnWorkspaces } from './lib'
|
|
7
|
-
|
|
8
|
-
const workspaces = yarnWorkspaces()
|
|
9
|
-
|
|
10
|
-
console.log(chalk.green('Copying Styles [CJS]'))
|
|
11
|
-
|
|
12
|
-
workspaces.forEach(({ name, location }) => {
|
|
13
|
-
return cpy(['**/*.sass', '**/*.scss', '**/*.gif', '**/*.css'], '../dist/cjs', {
|
|
14
|
-
cwd: `${process.cwd()}/${location}/src`,
|
|
15
|
-
parents: true,
|
|
16
|
-
})
|
|
17
|
-
.then((values) => values.forEach((value) => console.log(`Copied: ${value}`)))
|
|
18
|
-
.catch((reason) => {
|
|
19
|
-
console.log(`Copy Failed: ${name}: ${reason}`)
|
|
20
|
-
})
|
|
21
|
-
})
|
package/src/copy-styles-esm.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk'
|
|
4
|
-
import cpy from 'cpy'
|
|
5
|
-
|
|
6
|
-
import { yarnWorkspaces } from './lib'
|
|
7
|
-
|
|
8
|
-
const workspaces = yarnWorkspaces()
|
|
9
|
-
|
|
10
|
-
console.log(chalk.green('Copying Styles [ESM]'))
|
|
11
|
-
|
|
12
|
-
workspaces.forEach(({ name, location }) => {
|
|
13
|
-
return cpy(['**/*.sass', '**/*.scss', '**/*.gif', '**/*.css'], '../dist/esm', {
|
|
14
|
-
cwd: `${process.cwd()}/${location}/src`,
|
|
15
|
-
parents: true,
|
|
16
|
-
})
|
|
17
|
-
.then((values) => values.forEach((value) => console.log(`Copied: ${value}`)))
|
|
18
|
-
.catch((reason) => {
|
|
19
|
-
console.log(`Copy Failed: ${name}: ${reason}`)
|
|
20
|
-
})
|
|
21
|
-
})
|
package/src/copy-styles.ts
DELETED
package/src/deploy-major.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { runSteps } from './lib'
|
|
4
|
-
|
|
5
|
-
runSteps('Deploy [Major]', [
|
|
6
|
-
['yarn', 'clean'],
|
|
7
|
-
['yarn', 'workspaces foreach --all version minor --deferred'],
|
|
8
|
-
['yarn', 'build'],
|
|
9
|
-
['yarn', 'cycle'],
|
|
10
|
-
['yarn', 'gen-docs'],
|
|
11
|
-
['yarn', 'version apply --all'],
|
|
12
|
-
['yarn', 'workspaces foreach -pt npm publish'],
|
|
13
|
-
])
|
package/src/deploy-minor.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { runSteps } from './lib'
|
|
4
|
-
|
|
5
|
-
runSteps('Deploy [Minor]', [
|
|
6
|
-
['yarn', 'clean'],
|
|
7
|
-
['yarn', 'workspaces foreach --all version minor --deferred'],
|
|
8
|
-
['yarn', 'build'],
|
|
9
|
-
['yarn', 'cycle'],
|
|
10
|
-
['yarn', 'gen-docs'],
|
|
11
|
-
['yarn', 'version apply --all'],
|
|
12
|
-
['yarn', 'workspaces foreach -pt npm publish'],
|
|
13
|
-
])
|
package/src/deploy.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { runSteps } from './lib'
|
|
4
|
-
|
|
5
|
-
runSteps('Deploy [Patch]', [
|
|
6
|
-
['yarn', 'clean'],
|
|
7
|
-
['yarn', 'workspaces foreach --all version patch --deferred'],
|
|
8
|
-
['yarn', 'build'],
|
|
9
|
-
['yarn', 'cycle'],
|
|
10
|
-
['yarn', 'gen-docs'],
|
|
11
|
-
['yarn', 'version apply --all'],
|
|
12
|
-
['yarn', 'workspaces foreach -pt npm publish'],
|
|
13
|
-
])
|
package/src/gen-docs.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { cwd } from 'process'
|
|
4
|
-
|
|
5
|
-
import { runSteps } from './lib'
|
|
6
|
-
|
|
7
|
-
runSteps('Generate TypeDocs', [
|
|
8
|
-
[
|
|
9
|
-
'yarn',
|
|
10
|
-
[
|
|
11
|
-
'workspaces',
|
|
12
|
-
'foreach',
|
|
13
|
-
'-ptA',
|
|
14
|
-
'exec',
|
|
15
|
-
`${cwd()}/node_modules/typedoc/bin/typedoc`,
|
|
16
|
-
'--logLevel',
|
|
17
|
-
'Error',
|
|
18
|
-
'--tsconfig',
|
|
19
|
-
'./tsconfig.build.esm.json',
|
|
20
|
-
'--excludeExternals',
|
|
21
|
-
'./src/index.ts',
|
|
22
|
-
'--json',
|
|
23
|
-
'./dist/docs.json',
|
|
24
|
-
],
|
|
25
|
-
],
|
|
26
|
-
])
|
package/src/lib/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'child_process'
|
|
2
|
-
|
|
3
|
-
export const isYarnVersionOrGreater = (major: number, minor?: number, patch?: number): [boolean, string] => {
|
|
4
|
-
const result = spawnSync('yarn', ['-v'], { encoding: 'utf8', shell: true })
|
|
5
|
-
const version = result.stdout.toString().replaceAll('\n', '')
|
|
6
|
-
const versionNumbers = version.split('.').map((ver) => parseInt(ver))
|
|
7
|
-
const majorDelta = versionNumbers[0] - major
|
|
8
|
-
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1])
|
|
9
|
-
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2])
|
|
10
|
-
|
|
11
|
-
const majorOk = majorDelta >= 0
|
|
12
|
-
const minorOk = majorDelta > 0 || minorDelta >= 0
|
|
13
|
-
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0
|
|
14
|
-
|
|
15
|
-
return [majorOk && minorOk && patchOk, version]
|
|
16
|
-
}
|
package/src/lib/processEx.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk'
|
|
2
|
-
|
|
3
|
-
import { withErrnoException } from './withErrnoException'
|
|
4
|
-
import { withError } from './withError'
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
-
export const processEx = (ex: any) => {
|
|
8
|
-
const error = typeof ex === 'string' ? Error(ex) : ex
|
|
9
|
-
const exitCode =
|
|
10
|
-
withErrnoException(error, (error) => {
|
|
11
|
-
if (error.code === 'ENOENT') {
|
|
12
|
-
console.error(chalk.red(`'${error.path}' not found.`))
|
|
13
|
-
} else {
|
|
14
|
-
console.error(chalk.red(`Errno: ${error.code}`))
|
|
15
|
-
}
|
|
16
|
-
return error.errno ?? -1
|
|
17
|
-
}) ??
|
|
18
|
-
withError(error, (error) => {
|
|
19
|
-
console.error(chalk.red(`${error.name}: ${error.message}`))
|
|
20
|
-
return -1
|
|
21
|
-
}) ??
|
|
22
|
-
(() => {
|
|
23
|
-
console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))
|
|
24
|
-
return -1
|
|
25
|
-
})()
|
|
26
|
-
//This allows us to use a previously set exit code
|
|
27
|
-
process.exit(process.exitCode ?? exitCode)
|
|
28
|
-
}
|