Skip to content

Commit f59a16c

Browse files
authored
refactor: upgrade normalize, remove bower, remove old ie hacks (#790)
1 parent d288b16 commit f59a16c

File tree

32 files changed

+45
-302
lines changed

32 files changed

+45
-302
lines changed

.bowerrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
artifacts/
3-
bower_components/
43
build/
54
coverage/
65
node_modules/

.npmignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
.*
22
artifacts/
3-
bower_components/
4-
bower.json
53
CONTRIBUTING.md
64
Gruntfile.js
75
node_modules/

Gruntfile.js

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@ grunt.initConfig({
66

77
nick : 'pure',
88
pkg : grunt.file.readJSON('package.json'),
9-
bower: grunt.file.readJSON('bower.json'),
10-
11-
// -- bower.json Config ---------------------------------------------------------
12-
13-
bower_json: {
14-
release: {
15-
values: {
16-
main: 'pure.css'
17-
},
18-
19-
dest: 'build/'
20-
}
21-
},
229

2310
// -- Clean Config ---------------------------------------------------------
2411

@@ -50,7 +37,7 @@ grunt.initConfig({
5037
build: {
5138
files: [
5239
{'build/base.css': [
53-
'bower_components/normalize-css/normalize.css',
40+
'node_modules/normalize.css/normalize.css',
5441
'build/base.css'
5542
]},
5643

@@ -168,7 +155,7 @@ grunt.initConfig({
168155
options: {
169156
banner: [
170157
'/*!',
171-
'normalize.css v<%= bower.devDependencies["normalize-css"] %> | MIT License | git.io/normalize',
158+
'normalize.css v<%= pkg.devDependencies["normalize-css"] %> | MIT License | git.io/normalize',
172159
'Copyright (c) Nicolas Gallagher and Jonathan Neal',
173160
'*/\n'
174161
].join('\n')
@@ -221,18 +208,6 @@ grunt.initConfig({
221208
}
222209
},
223210

224-
// -- Strip Media Queries Config -------------------------------------------
225-
226-
stripmq: {
227-
all: {
228-
files: {
229-
//follows the pattern 'destination': ['source']
230-
'build/grids-responsive-old-ie.css':
231-
['build/grids-responsive.css']
232-
}
233-
}
234-
},
235-
236211
// -- CSS Selectors Config -------------------------------------------------
237212

238213
css_selectors: {
@@ -273,19 +248,16 @@ grunt.loadNpmTasks('grunt-contrib-watch');
273248
grunt.loadNpmTasks('grunt-css-selectors');
274249
grunt.loadNpmTasks('grunt-postcss');
275250
grunt.loadNpmTasks('grunt-pure-grids');
276-
grunt.loadNpmTasks('grunt-stripmq');
277251

278252
// Local tasks.
279253
grunt.loadTasks('tasks/');
280254

281-
grunt.registerTask('default', ['import', 'test', 'build']);
282-
grunt.registerTask('import', ['bower_install']);
255+
grunt.registerTask('default', ['test', 'build']);
283256
grunt.registerTask('test', ['csslint']);
284257
grunt.registerTask('build', [
285258
'clean:build',
286259
'copy:build',
287260
'pure_grids',
288-
'stripmq',
289261
'concat:build',
290262
'clean:build_res',
291263
'css_selectors:base',
@@ -302,7 +274,6 @@ grunt.registerTask('release', [
302274
'default',
303275
'clean:release',
304276
'copy:release',
305-
'bower_json:release',
306277
'compress:release'
307278
]);
308279

README.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,13 @@ A set of small, responsive CSS modules that you can use in every web project.
2020

2121
Note: You can [customize which Pure modules you need][customize].
2222

23-
**Install with Bower:**
24-
25-
```shell
26-
$ bower install --save pure
27-
```
28-
2923
**Install with NPM:**
3024

3125
```shell
3226
$ npm install purecss
3327
```
3428

3529
[Pure]: http://purecss.io/
36-
[Bower]: http://bower.io/
3730
[Build Status]: https://travis-ci.org/pure-css/pure
3831
[customize]: http://purecss.io/customize/
3932

@@ -80,13 +73,7 @@ You can include the Pure CSS file in your project by fetching it from unpkg:
8073
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
8174
```
8275

83-
You can also install Pure using [Bower][], using the following command:
84-
85-
```shell
86-
$ bower install --save pure
87-
```
88-
89-
Or you can install Pure using NPM:
76+
You can also install Pure using NPM:
9077

9178
```shell
9279
$ npm install purecss

RELEASE.md

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ For all of these steps, replace `1.0.0` with the correct version!
99
This assumes the following repo's are cloned and `npm` installed:
1010

1111
- https://github.com/pure-css/pure
12-
- https://github.com/pure-css/pure-site
13-
- https://github.com/pure-css/pure-release
14-
15-
You will also need `bower` installed globally.
1612

1713
## First, check everything
1814

@@ -31,7 +27,6 @@ You will also need `bower` installed globally.
3127
3228
- [ ] **Review all src/.../tests/manual/ files in target environments, including:**
3329
34-
- [ ] IE 10
3530
- [ ] IE 11
3631
- [ ] Edge
3732
- [ ] Chrome
@@ -43,7 +38,6 @@ You will also need `bower` installed globally.
4338
4439
- [ ] **Review pure-site in target environments with [Pure served locally](https://github.com/pure-css/pure-site/blob/master/README.md#running-with-pure-served-locally)**
4540
46-
- [ ] IE 10
4741
- [ ] IE 11
4842
- [ ] Edge
4943
- [ ] Chrome
@@ -67,7 +61,6 @@ You will also need `bower` installed globally.
6761
6862
It should have already been determined whether this is a minor or patch version release. Update Pure's version number to the new version in the following places. You'll likely be dropping a "-pre" suffix which was in place during the last development cycle. Do not use a "v" in the version (e.g., 1.0.0):
6963
70-
- [ ] bower.json
7164
- [ ] package.json
7265
- [ ] HISTORY.md (Update "NEXT")
7366
- [ ] README.md (x2 CDN URLs)
@@ -82,15 +75,6 @@ You will also need `bower` installed globally.
8275
8376
**Note:** If the build fails it's for a good reason, most likely because there's code which is not passing CSSLint. We should always fix these issues and never force a release.
8477
85-
### Pure-release repo
86-
87-
- [ ] **Update the pure-release repo**
88-
89-
This repo is used by Bower. It must be updated and released (and hence tagged).
90-
91-
- [ ] **Drop the Readme, History, and all build/*.css files into the pure-release repo**
92-
- [ ] **Commit and push the changes to the pure-release repo**
93-
- [ ] **git tag vX.X.X** and push to origin
9478
9579
## Publish pure to NPM
9680
@@ -108,56 +92,10 @@ Verify via https://unpkg.com/purecss@VERSION
10892
- [ ] **Draft a new release on [GitHub](https://github.com/pure-css/pure/releases) for all three repos,** using "v" in the version number (e.g., v1.0.0). Drafts are invisible to the public. Once these are published, the repos will be visible, and they will be tagged. **Don't publish them just yet.**
10993
11094
- [ ] **pure**
111-
- [ ] **pure-release**
112-
- [ ] **pure-site** (**Note:** pure-site has its own version number)
113-
114-
## Publishing the pure-site
115-
116-
**NOTE: The pure-site is currently hosted on Now.sh.**
117-
118-
Let's review where we're at:
119-
120-
* All the repos are checked and ready.
121-
* The build files are on the CDN.
122-
* We're ready to publish release notes and tag our repos by publishing the draft releases using GitHub.
123-
* Then we'll build the pure-site and check it.
124-
* Then we can deploy the pure-site to where the public can see it.
125-
126-
- [ ] **Update Pure Version in pure-css/pure-site**
127-
128-
Bump the version number to the new Pure version in package.json.
129-
130-
- [ ] **Commit those changes**
131-
132-
- [ ] **Publish pure-release**
133-
134-
From the [pure-release repo](https://github.com/pure-css/pure-release/releases), publish the release you drafted earlier. Otherwise Bower won't be able to take advantage of the version number you just updated, because pure-release won't yet have the tag.
135-
136-
- [ ] **Git push changes to pure-css/pure-site#master**
137-
138-
The local changes that were done to update the website for the release needs to be pushed back up to pure-css/pure-site#master on GitHub.com:
139-
140-
```
141-
$ git push upstream master
142-
```
143-
144-
- [ ] **Test pure-site on Now host**
145-
146-
```
147-
$ now .
148-
```
149-
150-
- [ ] **Publish pure-site release** If everything is looking good, you can publish the [release of pure-site](https://github.com/pure-css/pure-site/releases) on GitHub.
151-
152-
## Promote pure-site to Now alias
153-
154-
```
155-
$ now alias set <new pure deployment> purecss.io
156-
```
15795
15896
## Formally publish Pure
15997
160-
Now all our files are out there, the pure-release release is published, the pure-site release is published, and everything is looking good.
98+
Now all our files are out there and everything is looking good.
16199
162100
- [ ] **Publish pure**
163101
@@ -170,4 +108,4 @@ Now all our files are out there, the pure-release release is published, the pure
170108
171109
## Mark repo as pre-release
172110
173-
- [ ] We should mark the version number of the project (in package.json and bower.json) as 0.6.1-pre for clarity, so there's no mistaking the leading edge of the project from the last release. Commit those changes and push to master.
111+
- [ ] We should mark the version number of the project (in package.json) as 0.6.1-pre for clarity, so there's no mistaking the leading edge of the project from the last release. Commit those changes and push to master.

bower.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "purecss",
3-
"version": "1.0.1",
3+
"version": "2.0.0-rc.1",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/pure-css/pure.git"
@@ -15,7 +15,6 @@
1515
"files": "build/",
1616
"devDependencies": {
1717
"autoprefixer": "^9.6.1",
18-
"bower": "^1.8.2",
1918
"grunt": "^1.0.1",
2019
"grunt-cli": "^1.2.0",
2120
"grunt-contrib-clean": "^2.0.0",
@@ -27,8 +26,8 @@
2726
"grunt-contrib-watch": "^1.0.0",
2827
"grunt-css-selectors": "^1.1.0",
2928
"grunt-postcss": "^0.9.0",
30-
"grunt-pure-grids": "^1.0.0",
31-
"grunt-stripmq": "0.0.6",
29+
"grunt-pure-grids": "^2.0.0",
30+
"normalize.css": "^8.0.1",
3231
"tap": "^14.4.1"
3332
},
3433
"description": "Pure is a ridiculously tiny CSS library you can use to start any web project.",

site/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# Production
55
/build
66

7+
# Ignore manually copied pure files to static/css folder
8+
/static/css/pure
9+
710
# Generated files
811
.docusaurus
912
.cache-loader

site/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ This command generates static content into the `build` directory and can be serv
3030
$ GIT_USER=<Your GitHub username> USE_SSH=true npm run deploy
3131
```
3232

33-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
33+
The site is hosted on [Vercel](https://vercel.com/) and will automatically deploy when commits are merged to `master`.
34+
35+
### Including Pure
36+
37+
We want to use the locally built version of Pure so that the [layout examples](https://purecss.io/layouts/) are always using the `master` version, previously they had used a hardcoded CDN link.
38+
39+
To get Docusaurus to register the css as `static`, they have to exist in the `static/` directory before the site is built. Therefore, we copy the Pure `build/` in manually and `.gitignore` them. Once Docusaurus builds, they resolve as proper CSS files.
40+

0 commit comments

Comments
 (0)