Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Add in basic framework components.
Browse files Browse the repository at this point in the history
  • Loading branch information
awood committed Aug 19, 2014
1 parent 442dff1 commit 27cf33d
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "components"
}
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ignore Sublime files
*.sublime-workspace
*.sublime-project

# Ignore vim files
*.swp
*.swn
*.swo

# Ignore local nodejs packages
node_modules/

# Ignore node files
*.man
nodevars.bat
npm
npm.cmd

# Ignore generated files
build
.sass-cache

# RVM files
.ruby-gemset
.ruby-version
54 changes: 54 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
ClassLength:
# It's not worth bending over backwards to avoid long classes.
Enabled: false
CollectionMethods:
PreferredMethods:
collect: 'map'
reduce: 'inject'
detect: 'find'
find_all: 'select'
CyclomaticComplexity:
Enabled: false
Documentation:
# TODO: We need to add a bunch of docs before we can enable this.
Enabled: false
HashSyntax:
EnforcedStyle: hash_rockets
IfUnlessModifier:
Enabled: false
LineLength:
Enabled: true
Max: 100
MethodLength:
Max: 50
CountComments: false
ModuleFunction:
# The module_function declaration makes methods private so it means you can't use the module as a module.
Enabled: false
ParenthesesAroundCondition:
AllowSafeAssignment: false
PerlBackrefs:
Enabled: false
RaiseArgs:
EnforcedStyle: compact
RedundantReturn:
AllowMultipleReturnValues: true
RegexpLiteral:
Enabled: false
SignalException:
EnforcedStyle: only_raise
SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
StringLiterals:
# They say to not use double quoted strings unless there is interpolation.
# While this gives a marginal parse time speedup, it makes working with
# strings annoying.
Enabled: false
TrailingComma:
Enabled: true
UnneededPercentX:
Enabled: false
WhileUntilModifier:
Enabled: false
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'bootstrap-sass', '~> 3.2.0'
12 changes: 12 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
GEM
remote: https://rubygems.org/
specs:
bootstrap-sass (3.2.0.1)
sass (~> 3.2)
sass (3.4.0)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 3.2.0)
84 changes: 84 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*global module,require*/
var lrSnippet = require('connect-livereload')();
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};

module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

// configurable paths
var projectConfig = {
src: '',
dist: 'dist'
};

try {
projectConfig.src = require('./bower.json').appPath || projectConfig.src;
} catch (e) {}

grunt.initConfig({
config: projectConfig,
clean: {
build: '<%= config.dist %>'
},
connect: {
server: {
options: {
port: 9000,
hostname: '0.0.0.0',
middleware: function (connect) {
return [
lrSnippet,
mountFolder(connect, projectConfig.src),
mountFolder(connect, projectConfig.src + 'tests')
];
}
}
}
},
watch: {
options: {
livereload: true
},
css: {
files: 'sass/*.scss',
tasks: ['sass']
},
js: {
files: 'components/patternfly/dist/js/patternfly.min.js'
},
livereload: {
files: [
'dist/css/*.css',
'components/patternfly/tests/*.html',
'components/patternfly/dist/js/*.js'
]
}
},
sass: {
dist: {
options: {
style: 'compact'
},
files: {
'dist/css/patternfly.css': 'sass/patternfly.scss'
}
}
},
});

grunt.loadNpmTasks('grunt-contrib-sass');

grunt.registerTask('server', [
'connect:server',
'watch'
]);

grunt.registerTask('build', [
'sass',
]);

grunt.registerTask('default', ['build']);
};
24 changes: 24 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "PatternFlySass",
"version": "1.0.0",
"authors": "Red Hat",
"license": "Apache-2.0",
"homepage": "https://www.patternfly.org",
"main": [
"dist/css/patternfly.css"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"app/components",
"test",
"tests",
"package.json",
"Gruntfile.js"
],
"devDependencies": {
"patternfly": "~1.0.5",
"bootstrap-sass-official": "~3.1.1"
}
}
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "PatternFlySass",
"version": "1.0.0",
"author": "Red Hat",
"license": "Apache-2.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-sass": "~0.7.4",
"matchdep": "~0.3.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-connect": "~0.5.0",
"connect-livereload": "~0.3.0",
"grunt-contrib-uglify": "~0.3.2"
}
}

0 comments on commit 27cf33d

Please sign in to comment.