Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Client script and style resources using Bower (#22)
* Bower: jQuery, bootstrap, bootswatch + deploy * Bower: +jquery-timeago and jquery-uitablefilter * Grunt + bootswatch * Grunt: Bootswatch support * Temporary theme work * Removing Bootstrap source * Adding client script to gitignore * Removing client scripts * Adding Bower-related folders to gitignore * No need for html5shiv * Moving to Spacelab Bootswatch theme
- Loading branch information
1 parent
f4624a0
commit 561ec12
Showing
37 changed files
with
816 additions
and
9,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
# Logs | ||
*.log | ||
|
||
# Node | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# Client script | ||
bower_components/ | ||
.sass-cache/ | ||
|
||
# Static assets | ||
public/ | ||
resources/scss/build.scss | ||
|
||
# OS X | ||
.DS_Store | ||
|
||
# Local test files | ||
# Local scripts | ||
sync-*.js | ||
|
||
# Local development environment scripts | ||
bin/local* | ||
bin/contoso | ||
app.yaml | ||
|
||
# Tooling | ||
.vscode/ | ||
|
||
# Editors | ||
.vscode/ | ||
|
||
# Other routes and components that need not be included here | ||
docs/ | ||
routes/microsoft-specific* | ||
routes/docs.js | ||
views/docs/ | ||
public/css/docs.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// | ||
|
||
module.exports = function (grunt) { | ||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
builddir: 'public/css', | ||
buildscriptdir: 'public/js/', | ||
buildrootdir: 'public/', | ||
banner: '/*!\n' + | ||
' * <%= pkg.name %> v<%= pkg.version %>\n' + | ||
' * Homepage: <%= pkg.homepage %>\n' + | ||
' * Copyright 2012-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + | ||
' * Licensed under <%= pkg.license %>\n' + | ||
' * Based on Bootstrap\n' + | ||
'*/\n', | ||
concat: { | ||
options: { | ||
banner: '<%= banner %>', | ||
stripBanners: false | ||
}, | ||
dist: { | ||
src: [], | ||
dest: '' | ||
} | ||
}, | ||
copy: { | ||
bootstrap: { | ||
files: [ | ||
{ | ||
expand: true, | ||
src: '**', | ||
cwd: 'bower_components/bootstrap/dist/', | ||
dest: '<%= buildrootdir %>', | ||
}, | ||
] | ||
}, | ||
jquery: { | ||
files: [ | ||
{ | ||
expand: true, | ||
src: '**', | ||
cwd: 'bower_components/jQuery/dist/', | ||
dest: '<%= buildscriptdir %>', | ||
}, | ||
] | ||
}, | ||
resources: { | ||
files: [ | ||
{ | ||
expand: true, | ||
src: '**', | ||
cwd: 'resources/', | ||
dest: '<%= buildrootdir %>', | ||
}, | ||
] | ||
}, | ||
timeago: { | ||
files: [ | ||
{ | ||
expand: true, | ||
src: 'jquery.timeago.js', | ||
cwd: 'bower_components/jquery-timeago/', | ||
dest: '<%= buildscriptdir %>', | ||
}, | ||
] | ||
}, | ||
uitablefilter: { | ||
files: [ | ||
{ | ||
expand: true, | ||
src: 'jquery.uitablefilter.js', | ||
cwd: 'bower_components/jquery-uitablefilter/', | ||
dest: '<%= buildscriptdir %>', | ||
}, | ||
] | ||
}, | ||
}, | ||
clean: { | ||
build: { | ||
src: ['*/build.scss', '!theme/build.scss'] | ||
} | ||
}, | ||
}); | ||
|
||
grunt.registerTask('none', function () { }); | ||
|
||
grunt.registerTask('build_scss', 'build a regular theme from scss', function() { | ||
var theme = 'resources/scss'; | ||
var compress = true; | ||
|
||
var concatSrc; | ||
var concatDest; | ||
var scssDest; | ||
var scssSrc; | ||
var files = {}; | ||
var dist = {}; | ||
concatSrc = theme + '/_build.scss'; | ||
concatDest = theme + '/build.scss'; | ||
scssDest = '<%=builddir%>/bootstrap.css'; | ||
scssSrc = [theme + '/' + 'build.scss']; | ||
|
||
dist = {src: concatSrc, dest: concatDest}; | ||
grunt.config('concat.dist', dist); | ||
files = {}; | ||
files[scssDest] = scssSrc; | ||
grunt.config('sass.dist.files', files); | ||
grunt.config('sass.dist.options.style', 'expanded'); | ||
grunt.config('sass.dist.options.precision', 8); | ||
grunt.config('sass.dist.options.unix-newlines', true); | ||
|
||
grunt.task.run(['concat', 'sass', /*'prefix:' + scssDest,*/ 'clean:build', | ||
compress ? 'compress_scss:' + scssDest + ':' + '<%=builddir%>/bootstrap.min.css' : 'none']); | ||
}); | ||
|
||
grunt.registerTask('compress_scss', 'compress a generic css with sass', function(fileSrc, fileDst) { | ||
var files = {}; files[fileDst] = fileSrc; | ||
grunt.log.writeln('compressing file ' + fileSrc); | ||
|
||
grunt.config('sass.dist.files', files); | ||
grunt.config('sass.dist.options.style', 'compressed'); | ||
grunt.task.run(['sass:dist']); | ||
}); | ||
|
||
grunt.registerTask('default', ['copy', 'build_scss']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "azure-oss-portal", | ||
"description": "Azure Open Source Portal for GitHub", | ||
"main": "", | ||
"authors": [ | ||
"Jeff Wilcox <jwilcox@microsoft.com>" | ||
], | ||
"license": "MIT", | ||
"keywords": [ | ||
"github", | ||
"management", | ||
"organization" | ||
], | ||
"homepage": "https://github.com/Azure/azure-oss-portal", | ||
"private": true, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"test", | ||
"tests" | ||
], | ||
"dependencies": { | ||
"jQuery": "^3.1.0", | ||
"bootstrap": "^3.3.7", | ||
"bootswatch": "^3.3.7", | ||
"jquery-timeago": "timeago#^1.5.3", | ||
"jquery-uitablefilter": "git://github.com/natinusala/jquery-uitablefilter.git", | ||
"bootstrap-sass": "bootstrap-sass-official#^3.3.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.