Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the webfont and everything that builds the webfont #117

Merged
merged 2 commits into from
Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
### HEAD

### 5.0.0

Removes:

- Deprecating support for the webfont

### 4.4.0

Adds:

- svg.json file that is accessible from node require
Expand Down
45 changes: 2 additions & 43 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ module.exports = function(grunt) {
},
dist: {
files: {
'build/octicons.min.css': 'build/octicons.css',
'build/font/octicons.min.css': 'build/font/octicons.css'
'build/octicons.min.css': 'build/octicons.css'
}
}
},
Expand Down Expand Up @@ -81,45 +80,7 @@ module.exports = function(grunt) {
}
},

webfont: {
options: {
font: "octicons",
fontFamilyName: "Octicons",
types: 'eot,woff,woff2,ttf,svg',
fontHeight: 96,
normalize: false,
ascent: 84,
descent: 12,
htmlDemo: false,
codepointsFile: 'lib/font/codepoints.json',
templateOptions: {
baseClass: 'octicon',
classPrefix: 'octicon-',
mixinPrefix: 'octicon-',
fontFamilyName: "Octicons"
}
},
octicons_css: {
src: 'lib/svg/*.svg',
dest: 'build/font',
options: {
template: 'lib/font/template.css'
}
},
octicons_scss: {
src: 'lib/svg/*.svg',
dest: 'build/font',
options: {
stylesheet: 'scss',
template: 'lib/font/template.scss'
}
}
},

clean: {
font: [
'build/font/*'
],
svg: [
'build/svg/*',
'build/sprite.octicons.svg',
Expand All @@ -131,18 +92,16 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-svg-sprite');
grunt.loadNpmTasks('grunt-webfont');
grunt.loadNpmTasks('grunt-svgmin');
grunt.loadNpmTasks('grunt-cssnano');
grunt.loadNpmTasks('grunt-sass');

// build tasks
grunt.registerTask('css', ['sass', 'postcss', 'cssnano']);
grunt.registerTask('font', ['clean:font', 'webfont']);
grunt.registerTask('svg', ['clean:svg', 'svgmin', 'svg_sprite']);

// default task, build /dist/
grunt.registerTask('default', [ 'svg', 'font', 'css', 'svg_json']);
grunt.registerTask('default', [ 'svg', 'css', 'svg_json']);

grunt.registerTask('svg_json', 'create a json object with all minimized svg', function() {
var result = {}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ You’ll next need to build your Octicons.
All the files you need will be in the `/build/` directory already, but if you’ve made changes to the `/lib/` directory and need to regenerate, follow these steps:

1. Open the Octicons directory in Terminal
2. Run the command `script/bootstrap`. This will install any necessary dependencies for generating the Octicons font and SVGs.
3. Run the command `grunt`. Running the grunt task will generate the font and SVGs, placing them in the `/build/` directory.
2. `npm install` to install all dependencies for the project.
3. Run the command `npm run build`. This will run the grunt task to build the SVGs, placing them in the `/build/` directory.

## Publishing

Expand All @@ -56,8 +56,8 @@ If you have access to publish this repository, these are the steps to publishing

When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).

_Font License:_ [SIL OFL 1.1](http://scripts.sil.org/OFL)
Applies to all font files and SVG files
_SVG License:_ [SIL OFL 1.1](http://scripts.sil.org/OFL)
Applies to all SVG files

_Code License:_ [MIT](./LICENSE)
Applies to all other files
Expand Down
Loading