Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
chore(breakpoint-sass): removes breakpoint-sass dep, remove bower bui…
Browse files Browse the repository at this point in the history
…ld, removing vendors file #129

BREAKING CHANGE: breakpoint-sass dep was removed, you hae to include that by your own, bower specific dristribution doesn't exist anymore

replace this:

```scss
@import "bower_components/dress-code/sass/dress-code"
@include dc-everything
```

with:

```scss
@import "bower_components/compass-breakpoint/stylesheets/breakpoint" // import required breakpoint sass module/plugin
@import "bower_components/dress-code/dist/sass/dress-code"
@include dc-everything;
```
  • Loading branch information
rbarilani authored and gabrielhl committed Mar 23, 2016
1 parent d6e6492 commit b73f2f1
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 123 deletions.
29 changes: 8 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The Dress Code is the official style guide and style framework for all Brand Sol

### Requirements

* [modernizer](https://modernizr.com/) included in the ```<head>``` of your web page.
* [modernizer](https://modernizr.com/) ~2.8.2 included in the ```<head>``` of your web page.

### Install

#### with Bower

```
bower install https://github.com/zalando/dress-code-bower.git --save
bower install https://github.com/zalando/dress-code.git --save
```

#### with Npm
Expand All @@ -48,28 +48,23 @@ npm install
Include this in your ```<head>```:

```html
<link href="bower_components/dress-code/css/dress-code.min.css" rel="stylesheet">
<link href="bower_components/dress-code/dist/css/dress-code.min.css" rel="stylesheet">
```

or if installed with **npm**:


```html
<link href="node_modules/dress-code/dist/css/dress-code.min.css" rel="stylesheet">
```


#### How to use dress-code SASS

> **At the moment we don't support ```npm@3```**
You can compile the dress code by your own using a sass compiler.

```scss
@import "node_modules/breakpoint-sass/stylesheets" // this a required dependency, load this before loading the dress-code
@import "node_modules/dress-code/dist/sass/dress-code" // or bower_components/dress-code/sass/dress-code
@include dc-everything; // output dc-* selectors
```

> the dress-code rely on [breakpoint-sass](https://github.com/at-import/breakpoint) to manage media queries
more easily, please be sure that the plugin/scss module is loaded before trying to compile the dress-code stuff. Thanks.


##### Compass notes

> Note for those using compass. Add this to yours config.rb file:
Expand Down Expand Up @@ -160,14 +155,6 @@ $ npm run deploy:demo
Publish the demo as github-pages website @ https://zalando.github.io/dress-code


**Deploy bower package:**

```
$ npm run deploy:bower
```

Publish the distribution version for bower @ https://github.com/zalando/dress-code-bower

## License

The Dress Code is released under the MIT license. See LICENSE for details.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.1.1-alpha",
"homepage": "https://zalando.github.io/dress-code",
"description": "The Dress Code is the official style guide/UI toolkit for all Brand Solutions products.",
"main": "sass/dress-code.scss",
"main": "dist/sass/dress-code.scss",
"moduleType": [],
"authors": [
"Thomas Nägele <thomas.naegele.extern@zalando.de>",
Expand All @@ -20,6 +20,6 @@
],
"dependencies": {
"compass-breakpoint": "breakpoint-sass#~2.6.1",
"modernizer": "~2.8.2"
"modernizr": "~2.8.2"
}
}
24 changes: 0 additions & 24 deletions docs/BOWER-README.md

This file was deleted.

18 changes: 3 additions & 15 deletions docs/guides/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When the CI job pass with SUCCESS, merge or rebase the release branch on top of
```
git checkout master;
git pull;
git rebase release/<semver>;
git rebase release/<semver>; # or open a pull request to master
```

6) Add a git tag, push the master branch and the new tag.
Expand All @@ -48,26 +48,14 @@ git push origin master;
git push origin <semver>; # push the tag
```

7) Sync the ```bower``` version.

```
npm run deploy:bower
cd .tmp/.deploy-bower
git tag -a <semver> -m "<semver>";
git push origin <semver>; # push the tag
git checkout develop;
git rebase master;
git push origin develop;
git checkout master;
```

8) Build and deploy [docs/demo](http://zalando.github.io/dress-code/) artifacts.
7) Build and deploy demo [docs/demo](http://zalando.github.io/dress-code/) artifacts.
```
npm run deploy:demo;
```
9) Keep in sync the develop branch.
8) Keep in sync the develop branch.
```
git checkout develop;
Expand Down
51 changes: 2 additions & 49 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ var replace = require('gulp-replace');
var reload = browserSync.reload;
var runSequence = require('run-sequence');
var sass = require('gulp-sass');
// var sassImportOnce = require('node-sass-import-once');
var sourcemaps = require('gulp-sourcemaps');
var webpack = require('webpack');
var gulp = require('gulp');
var ghPages = require('gulp-gh-pages');
var gulpFilter = require('gulp-filter');
var gulpDebug = require('gulp-debug');
var iconfont = require('gulp-iconfont');
var iconfontCss = require('gulp-iconfont-css');
Expand All @@ -44,7 +42,7 @@ var config = {
},
styles: {
fabricator: './docs/demo/assets/fabricator/styles/fabricator.scss',
toolkit: './src/styles/index.scss'
toolkit: './src/styles/_index.scss'
},
images: 'src/img/**/*',
icons: 'src/icons/*.svg'
Expand Down Expand Up @@ -332,53 +330,8 @@ gulp.task('dist:icons', ['demo:icons'], function () {
.pipe(gulp.dest(path.join(config.tmp.dist, '/fonts')));
});

gulp.task('dist:bower:clean', function (cb) {
return del([config.tmp.distBower], cb);
});


gulp.task('dist:bower', ['dist:bower:clean', 'dist:build'], function () {
var bowerReadmeFilter = gulpFilter(['BOWER-README.md'], {restore: true});
var vendorsFilter = gulpFilter(['**/sass/core/_vendors.scss'], {restore: true});

return gulp.src([
path.join(config.tmp.dist, '/**/*'),
'bower.json',
'LICENSE',
'docs/BOWER-README.md',
'.editorconfig'
])
.pipe(bowerReadmeFilter)
.pipe(rename('README.md'))
.pipe(gulp.dest(config.tmp.distBower))
.pipe(bowerReadmeFilter.restore)
.pipe(vendorsFilter)
.pipe(replace(/@import "..\/..\/..\/node_modules\/(.*)"/g, function (match, p1) {
if (p1.indexOf('breakpoint-sass') > -1) {
return '@import "../../../compass-breakpoint/stylesheets/breakpoint"';
} else {
return '@import "../../../' + p1 + '"';
}
}))
.pipe(vendorsFilter.restore)
.pipe(gulp.dest(config.tmp.distBower));
});

// push bower dist to the bower version repo
// use --dev to push to the develop branch (default: master)
gulp.task('dist:bower:deploy', ['dist:bower'], function () {
return gulp.src(path.join(config.tmp.distBower, '/**/*'))
.pipe(ghPages({
cacheDir: config.tmp.deployBower,
branch: gutil.env.dev ? 'develop' : 'master',
remoteUrl: 'git@github.com:zalando/dress-code-bower'
}));
});

gulp.task('dist:changelog', function() {
var changelogConfig = {
preset: 'angular'
};
var changelogConfig = { preset: 'angular' };

return gulp.src('CHANGELOG.md', {
buffer: true
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"scripts": {
"lint": "gulp scss-lint",
"build": "gulp dist",
"build:bower": "gulp dist:bower",
"build:demo": "gulp demo",
"deploy:demo": "gulp demo:deploy --demo-base-path=/dress-code",
"deploy:bower": "gulp dist:bower:deploy",
"changelog": "gulp dist:changelog",
"start": "gulp"
},
Expand All @@ -33,10 +31,12 @@
"type": "git",
"url": "https://github.com/zalando/dress-code.git"
},
"engineStrict": true,
"engines": {
"node": ">=0.10.0 <=4.x",
"npm": "^2.0.0"
"node": ">=0.12.0 <=5.x",
"npm": ">=2.x.x"
},
"dependencies": {
"breakpoint-sass": "^2.6.1"
},
"dependencies": {
"breakpoint-sass": "^2.6.1"
Expand Down
11 changes: 11 additions & 0 deletions src/styles/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// This file is used to generate the distribution css artifacts
// and for the demo
//

// breakpoint-sass
@import "../../node_modules/breakpoint-sass/stylesheets/breakpoint";

@import "./dress-code";

@include dc-everything;
1 change: 0 additions & 1 deletion src/styles/core/_core.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import "vendors";
@import "variables";
@import "mixins";
@import "placeholders";
Expand Down
1 change: 0 additions & 1 deletion src/styles/core/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// ---------------------------------------------------------------------------
//
// The clearfix
Expand Down
2 changes: 0 additions & 2 deletions src/styles/core/_vendors.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/styles/index.scss

This file was deleted.

0 comments on commit b73f2f1

Please sign in to comment.