Skip to content

Commit 752ad3d

Browse files
types (#456)
1 parent c27d652 commit 752ad3d

File tree

2 files changed

+49
-18
lines changed

2 files changed

+49
-18
lines changed

README.md

Lines changed: 48 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,37 @@
66

77
This package aims to include all of the frontend assets (JS and SCSS) necessary to create components using the HTML markup examples in the [Explorer 1 Storybook](https://nasa-jpl.github.io/explorer-1/).
88

9+
## Version 3.x.x docs (draft)
10+
11+
Version 3.x.x adds Vue components and a Nuxt module to Explorer-1.
12+
13+
```bash
14+
# Start the Vue Storybook
15+
make vue-storybook
16+
17+
# Start a Vue app to test components directly (optional)
18+
make vue
19+
20+
# Start a Nuxt app to test the nuxt module
21+
make nuxt
22+
23+
# Start the HTML Storybook (from v2.x.x)
24+
make html-storybook
25+
```
26+
27+
### Developing Vue components
28+
29+
1. Create new component files in `packages/vue`
30+
2. Start the Vue Storybook to preview and test your component (your component must have a `*.stories.js` file): `make vue-storybook`
31+
32+
--
33+
34+
**The below docs only apply to Explorer 1 versions 2.x.x and earlier. Docs are incomplete for version 3.x.x**
35+
936
## Table of contents
1037

38+
- [Version 3.x.x docs (draft)](#version-3xx-docs-draft)
39+
- [Developing Vue components](#developing-vue-components)
1140
- [What's included](#whats-included)
1241
- [Installation](#installation)
1342
- [Using bundled assets](#using-bundled-assets)
@@ -28,21 +57,23 @@ This package includes the base styles of Explorer 1 (typography, colors, spacing
2857
<details><summary>Package contents</summary>
2958

3059
```
60+
3161
@nasa-jpl/explorer-1/
3262
├── dist/
33-
├── css/
34-
├── explorer-1.min.css
35-
└── font-face.css
36-
├── fonts/
37-
├── archivo-narrow/
38-
└── metropolis/
39-
└── js/
40-
└── explorer-1.min.js
63+
│ ├── css/
64+
├── explorer-1.min.css
65+
└── font-face.css
66+
│ ├── fonts/
67+
├── archivo-narrow/
68+
└── metropolis/
69+
│ └── js/
70+
│ └── explorer-1.min.js
4171
├── src/
42-
├── fonts/
43-
├── js/
44-
└── scss/
72+
│ ├── fonts/
73+
│ ├── js/
74+
│ └── scss/
4575
└── tailwind.config.js
76+
4677
```
4778

4879
</details>
@@ -111,12 +142,12 @@ Below is an example of how to use the Explorer 1 Tailwind CSS config in your own
111142
// your-project/tailwind.config.js
112143

113144
// import Explorer 1's Tailwind config
114-
const explorer1Config = require('@nasa-jpl/explorer-1/tailwind.config.js')
145+
const explorer1Config = require('@nasa-jpl/explorer-1/tailwind.config.js');
115146

116147
module.exports = {
117148
...explorer1Config,
118149
purge: ['../**/*.html'], // this will override Explorer 1's purge settings
119-
}
150+
};
120151
```
121152

122153
[Learn more about Tailwind CSS configuration](https://tailwindcss.com/docs/configuration)
@@ -193,14 +224,14 @@ npm install --save lazysizes
193224

194225
```js
195226
// your-project.js
196-
require('@nasa-jpl/explorer-1/src/js/vendors/_lazysizes.js')
227+
require('@nasa-jpl/explorer-1/src/js/vendors/_lazysizes.js');
197228
```
198229

199230
Some components also require additional JavaScript from explorer-1:
200231

201232
```js
202233
// your-project.js
203-
require('@nasa-jpl/explorer-1/src/js/components/_HeroMedia.js')
234+
require('@nasa-jpl/explorer-1/src/js/components/_HeroMedia.js');
204235
```
205236

206237
Reference the JavaScript files in [`/src/js/components/`](https://github.com/nasa-jpl/explorer-1/tree/main/src/js/components) for components that require additional JavaScript. The files will share the same name as the component.
@@ -221,7 +252,7 @@ npm install --save swiper
221252

222253
```js
223254
// your-project.js
224-
require('@nasa-jpl/explorer-1/src/js/vendors/_swiper.js')
255+
require('@nasa-jpl/explorer-1/src/js/vendors/_swiper.js');
225256
```
226257

227258
### Additional requirements for modals and lightboxes
@@ -241,7 +272,7 @@ npm install --save @fancyapps/ui
241272

242273
```js
243274
// your-project.js
244-
require('@fancyapps/ui')
275+
require('@fancyapps/ui');
245276
```
246277

247278
## Component templates (HTML)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "explorer-1",
3-
"version": "1.0.0",
3+
"version": "3.0.0-alpha",
44
"type": "module",
55
"description": "Monorepo for JPL's design system, Explorer 1",
66
"keywords": [

0 commit comments

Comments
 (0)