pdap-design-system 2.5.0 → 2.5.2-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +6 -20
- package/package.json +7 -17
- package/bin/pdap-design-system-cli.js +0 -28
package/README.md
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
_A `Vue` component library, styling system, and image asset repository for PDAP-branded client apps._
|
3
3
|
|
4
4
|
[![Current npm release](https://img.shields.io/npm/v/pdap-design-system?style=for-the-badge)](https://www.npmjs.com/package/pdap-design-system)
|
5
|
-
![Build status](
|
6
|
-
![
|
5
|
+
![Build status](https://img.shields.io/github/actions/workflow/status/Police-Data-Accessibility-Project/design-system/build.yaml?branch=main&style=for-the-badge)
|
6
|
+
![Coverage Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/joshuagraber/f3a173e87a763056b73438f503680993/raw/ff7d81845d17020e8a2bc01481d3cda512a15698/pdap-design-system__heads_main.json)
|
7
7
|
![License](https://img.shields.io/github/license/Police-Data-Accessibility-Project/design-system.svg?style=for-the-badge&color=green)
|
8
8
|
|
9
9
|
|
@@ -88,24 +88,6 @@ Or, if you need them all, you can import all images at the app level. Just remem
|
|
88
88
|
import `pdap-design-system/images`;
|
89
89
|
```
|
90
90
|
|
91
|
-
### Using the CLI to copy assets to your local project directory
|
92
|
-
|
93
|
-
If you want either styles or images copied to a local directory, you can do so from the root directory of your project.
|
94
|
-
|
95
|
-
Assets can be copied using the `pdap-design-system` command line method exposed by this package.
|
96
|
-
|
97
|
-
One of the following arguments is required:
|
98
|
-
`--copy-assets`: Copies all images and styles.
|
99
|
-
`--copy-images`: Copies all images.
|
100
|
-
`--copy-styles`: Copies all styles.
|
101
|
-
|
102
|
-
The following argument is optional:
|
103
|
-
`--to={path}`: Path to directory where assets should be copied. Defaults to `assets`
|
104
|
-
|
105
|
-
```
|
106
|
-
pdap-design-system --copy-images --to=image-assets
|
107
|
-
```
|
108
|
-
|
109
91
|
## Development Setup
|
110
92
|
|
111
93
|
1. Clone the repo
|
@@ -166,3 +148,7 @@ Use this [terminology](https://docs.pdap.io/activities/terms-and-definitions).
|
|
166
148
|
|
167
149
|
|
168
150
|
_n.b. There are some other scripts defined in the `package.json` `"scripts"` field, but they are mostly for CI or cleanup post-build, etc. You shouldn't need them._
|
151
|
+
|
152
|
+
## Releasing
|
153
|
+
Incremental updates can be added to `main` directly via a PR.
|
154
|
+
For more significant updates, the `beta` branch can be used for releasing incremental beta releases to test the bigger feature without releasing to production.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pdap-design-system",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.2-beta.1",
|
4
4
|
"description": "Global styles for PDAP apps",
|
5
5
|
"author": "Police Data Accessibility Project, Inc.",
|
6
6
|
"license": "ISC",
|
@@ -59,7 +59,6 @@
|
|
59
59
|
"@vue/eslint-config-typescript": "^12.0.0",
|
60
60
|
"@vue/test-utils": "^2.4.1",
|
61
61
|
"autoprefixer": "^10.4.16",
|
62
|
-
"badge-maker": "^3.3.1",
|
63
62
|
"cheerio": "1.0.0-rc.12",
|
64
63
|
"conventional-changelog-angular": "^7.0.0",
|
65
64
|
"cross-env": "^7.0.3",
|
@@ -96,37 +95,28 @@
|
|
96
95
|
},
|
97
96
|
"scripts": {
|
98
97
|
"_commit": "cz",
|
99
|
-
"build": "vite build && vue-tsc
|
98
|
+
"build": "vite build && vue-tsc",
|
100
99
|
"build:watch": "vite build && vue-tsc --watch",
|
101
100
|
"ci": "npm run clean && npm ci",
|
102
101
|
"clean": "run-p clean:*",
|
103
102
|
"clean:deps": "rimraf node_modules",
|
104
|
-
"clean:
|
105
|
-
"clean:test": "rimraf coverage test/report",
|
103
|
+
"clean:test": "rimraf coverage",
|
106
104
|
"lint": "run-p lint:*",
|
107
105
|
"lint:css": "stylelint 'src/**/*.{css,vue}'",
|
108
106
|
"lint:es": "eslint src --ext .ts .",
|
109
107
|
"lint:ts": "vue-tsc",
|
110
|
-
"postbuild": "
|
111
|
-
"posttest": "npm run
|
108
|
+
"postbuild": "rimraf dist/{config,utils}",
|
109
|
+
"posttest": "npm run clean:test",
|
112
110
|
"prepare": "husky install",
|
113
111
|
"test": "vitest --dom --run --coverage",
|
114
112
|
"test:changed": "npm run test -- --changed",
|
113
|
+
"test:badge": "vitest run --coverage.enabled --coverage.reporter='text-summary'",
|
115
114
|
"test:ci": "npm run test -- --silent",
|
116
|
-
"typecheck": "vue-tsc"
|
117
|
-
"badges": "run-p badges:*",
|
118
|
-
"badges:build": "node ./tools/generateBuildBadge.js",
|
119
|
-
"badges:coverage": "node ./tools/generateCoverageBadge.js"
|
115
|
+
"typecheck": "vue-tsc"
|
120
116
|
},
|
121
117
|
"workspaces": [
|
122
118
|
"eslint-config"
|
123
119
|
],
|
124
|
-
"bin": {
|
125
|
-
"pdap-design-system": "./bin/pdap-design-system-cli.js"
|
126
|
-
},
|
127
|
-
"keywords": [
|
128
|
-
"pdap-design-system"
|
129
|
-
],
|
130
120
|
"files": [
|
131
121
|
"bin",
|
132
122
|
"dist",
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
import minimist from 'minimist';
|
3
|
-
import cli from '../cli';
|
4
|
-
import process from 'process';
|
5
|
-
|
6
|
-
// Convert argv to object keyed by argName where --argName is what is passed to CLI
|
7
|
-
const args = minimist(process.argv);
|
8
|
-
|
9
|
-
switch (true) {
|
10
|
-
case args['copy-assets']:
|
11
|
-
cli.copyAllAssets(args);
|
12
|
-
break;
|
13
|
-
case args['copy-images']:
|
14
|
-
cli.copyImageAssets(args);
|
15
|
-
break;
|
16
|
-
case args['copy-styles']:
|
17
|
-
cli.copyStyleAssets(args);
|
18
|
-
break;
|
19
|
-
default:
|
20
|
-
console.log(
|
21
|
-
'No option argument was passed to pdap-design-system CLI.',
|
22
|
-
'\n Current options are:',
|
23
|
-
'\n --copy-assets: Copy all assets to assets/ (default) or custom path passed to optional --to argument.',
|
24
|
-
'\n --copy-images: Copy only image assets to assets/ (default) or custom path passed to optional --to argument.',
|
25
|
-
'\n --copy-styles: Copy only CSS assets to assets/ (default) or custom path passed to optional --to argument.'
|
26
|
-
);
|
27
|
-
break;
|
28
|
-
}
|