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

Move off bower #189

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from
Open
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
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ node_modules
dist
.tmp
.saas-cache
bower_components
screenshots
*~
*.swp
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ node_modules
dist
.tmp
.sass-cache
bower_components
*~
*.swp
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,18 @@ RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
RUN mkdir -p $SOURCE_DIR/dist \
$SOURCE_DIR/app \
$SOURCE_DIR/test \
$SOURCE_DIR/.git
$SOURCE_DIR/.git

# Add dirs
ADD app $SOURCE_DIR/app
ADD test $SOURCE_DIR/test

# Dot files
ADD .jshintrc $SOURCE_DIR/
ADD .bowerrc $SOURCE_DIR/
ADD .editorconfig $SOURCE_DIR/
ADD .travis.yml $SOURCE_DIR/

# Other files
ADD bower.json $SOURCE_DIR/
ADD Gruntfile.js $SOURCE_DIR/
ADD LICENSE $SOURCE_DIR/
ADD package.json $SOURCE_DIR/
Expand Down Expand Up @@ -82,7 +80,6 @@ RUN apt-get -y update && \
git config --global url."https://".insteadOf git:// && \
cd $SOURCE_DIR && \
npm install && \
node_modules/bower/bin/bower install --allow-root && \
node_modules/grunt-cli/bin/grunt build --allow-root && \
cp -rf $SOURCE_DIR/dist/* $WWW_DIR && \
rm -rf $SOURCE_DIR && \
Expand Down
34 changes: 6 additions & 28 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (grunt) {

// Configurable paths for the application
var appConfig = {
app: require('./bower.json').appPath || 'app',
app: 'app',
dist: 'dist'
};

Expand All @@ -34,10 +34,6 @@ module.exports = function (grunt) {

// Watches files for changes and runs tasks based on the changed files
watch: {
bower: {
files: ['bower.json'],
tasks: ['wiredep']
},
js: {
files: ['<%= yeoman.app %>/{,*/}*.js'],
tasks: ['newer:jshint:all'],
Expand Down Expand Up @@ -105,8 +101,8 @@ module.exports = function (grunt) {
middlewares.push(
connect.static('.tmp'),
connect().use(
'/bower_components',
connect.static('./bower_components')
'/node_modules',
connect.static('./node_modules')
),
connect.static(appConfig.app)
);
Expand All @@ -123,8 +119,8 @@ module.exports = function (grunt) {
connect.static('.tmp'),
connect.static('test'),
connect().use(
'/bower_components',
connect.static('./bower_components')
'/node_modules',
connect.static('./node_modules')
),
connect.static(appConfig.app)
];
Expand Down Expand Up @@ -189,14 +185,6 @@ module.exports = function (grunt) {
}
},

// Automatically inject Bower components into the app
wiredep: {
app: {
src: ['<%= yeoman.app %>/index.html'],
ignorePath: /\.\.\//
}
},

// Renames files for browser caching purposes
filerev: {
dist: {
Expand Down Expand Up @@ -316,13 +304,6 @@ module.exports = function (grunt) {
}
},

// Replace Google CDN references
cdnify: {
dist: {
html: ['<%= yeoman.dist %>/*.html']
}
},

// Copies remaining files to places other tasks can use
copy: {
dist: {
Expand All @@ -346,7 +327,7 @@ module.exports = function (grunt) {
src: ['generated/*']
}, {
expand: true,
cwd: 'bower_components/bootstrap/dist',
cwd: 'node_modules/bootstrap/dist',
src: 'fonts/*',
dest: '<%= yeoman.dist %>'
}]
Expand Down Expand Up @@ -391,7 +372,6 @@ module.exports = function (grunt) {

grunt.task.run([
'clean:server',
'wiredep',
'concurrent:server',
'autoprefixer',
'configureProxies:server',
Expand All @@ -415,14 +395,12 @@ module.exports = function (grunt) {

grunt.registerTask('build', [
'clean:dist',
'wiredep',
'useminPrepare',
'concurrent:dist',
'autoprefixer',
'concat',
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'filerev',
Expand Down
8 changes: 4 additions & 4 deletions app/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ <h3>Grunt</h3>
</div>
<div class="col-xs-12 col-md-3">
<div class="thumbnail">
<img src="images/tool-bower.png" alt="Bower">
<img src="images/tool-npm.png" alt="NPM">
<div class="caption">
<h3>Bower</h3>
<p>The Bower package manager is used to manage all the dependencies of the code.</p>
<p><a href="http://bower.io/" class="btn btn-primary" role="button">Checkout Bower</a> </p>
<h3>NPM</h3>
<p>The NPM package manager is used to manage all the dependencies of the code.</p>
<p><a href="http://npmjs.com/" class="btn btn-primary" role="button">Checkout NPM</a> </p>
</div>
</div>
</div>
Expand Down
Binary file removed app/images/tool-bower.png
Binary file not shown.
Binary file added app/images/tool-npm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 26 additions & 26 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/toastr/toastr.css" />
<link rel="stylesheet" href="bower_components/angular-loading-bar/build/loading-bar.css" />
<!-- endbower -->
<!-- npm:css -->
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="node_modules/toastr/toastr.css" />
<link rel="stylesheet" href="node_modules/angular-loading-bar/build/loading-bar.css" />
<!-- endnpm -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
Expand Down Expand Up @@ -47,31 +47,31 @@ <h3 class="text-muted">Docker Registry Frontend</h3>

<!-- build:js(.) scripts/oldieshim.js -->
<!--[if lt IE 9]>
<script src="bower_components/es5-shim/es5-shim.js"></script>
<script src="bower_components/json3/lib/json3.js"></script>
<script src="node_modules/es5-shim/es5-shim.js"></script>
<script src="node_modules/json3/lib/json3.js"></script>
<![endif]-->
<!-- endbuild -->

<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/toastr/toastr.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="bower_components/angular-loading-bar/build/loading-bar.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/angular-moment/angular-moment.js"></script>
<script src="bower_components/angular-smart-table/dist/smart-table.min.js"></script>
<script src="bower_components/angular-filter/dist/angular-filter.min.js"></script>
<script src="bower_components/angular-bootstrap-checkbox/angular-bootstrap-checkbox.js"></script>
<!-- endbower -->
<!-- npm:js -->
<script src="node_modules/jquery/dist/jquery.js"></script>
<script src="node_modules/angular/angular.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script src="node_modules/angular-resource/angular-resource.js"></script>
<script src="node_modules/angular-cookies/angular-cookies.js"></script>
<script src="node_modules/angular-sanitize/angular-sanitize.js"></script>
<script src="node_modules/angular-animate/angular-animate.js"></script>
<script src="node_modules/angular-touch/angular-touch.js"></script>
<script src="node_modules/angular-route/angular-route.js"></script>
<script src="node_modules/toastr/toastr.js"></script>
<script src="node_modules/angular-ui-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="node_modules/angular-loading-bar/build/loading-bar.js"></script>
<script src="node_modules/moment/moment.js"></script>
<script src="node_modules/angular-moment/angular-moment.js"></script>
<script src="node_modules/angular-smart-table/dist/smart-table.min.js"></script>
<script src="node_modules/angular-filter/dist/angular-filter.js"></script>
<script src="node_modules/angular-bootstrap-checkbox/angular-bootstrap-checkbox.js"></script>
<!-- endnpm -->
<!-- endbuild -->

<!-- build:js({.tmp,app}) scripts/scripts.js -->
Expand Down
31 changes: 0 additions & 31 deletions bower.json

This file was deleted.

1 change: 0 additions & 1 deletion develop/start-develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ set -x
set -e
cd $SOURCE_DIR
npm install
node_modules/bower/bin/bower install --allow-root
node_modules/grunt-cli/bin/grunt serve --allow-root
83 changes: 51 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,58 @@
{
"name": "docker-registry-frontend",
"description": "A pure web-based frontend to a docker-registry",
"version": "0.0.2",
"dependencies": {},
"author": "Konrad Kleine",
"license": "MIT",
"keywords": [
"docker",
"registry",
"frontend",
"ui"
],
"main": "Gruntfile.js",
"directories": {
"test": "test"
},
"engines": {
"node": ">=0.10.0"
},
"repository": {
"type": "git",
"url": "[email protected]:kwk/docker-registry-frontend.git"
},
"bugs": {
"url": "https://github.com/kwk/docker-registry-frontend/issues"
},
"scripts": {
"start": "grunt serve",
"pretest": "npm install",
"test": "karma start test/karma.conf.js",
"test-single-run": "karma start test/karma.conf.js --single-run"
},
"dependencies": {
"angular": "~1.3.0",
"angular-animate": "~1.3.0",
"angular-bootstrap-checkbox": "~0.5.0",
"angular-cookies": "~1.3.0",
"angular-filter": "~0.5.2",
"angular-loading-bar": "~0.6.0",
"angular-moment": "~0.8.2",
"angular-resource": "~1.3.0",
"angular-route": "~1.3.0",
"angular-sanitize": "~1.3.0",
"angular-smart-table": "~1.4.12",
"angular-touch": "~1.3.0",
"angular-ui-bootstrap": "~0.13.0",
"bootstrap": "3.3.4",
"es5-shim": "~3.2.0",
"jquery": "^2.1.4",
"json3": "~3.3.1",
"toastr": "~2.0.3"
},
"devDependencies": {
"bower": "^1.7.2",
"angular-mocks": "~1.3.0",
"angular-scenario": "~1.3.0",
"connect-modrewrite": "^0.8.2",
"grunt": "^0.4.1",
"grunt-autoprefixer": "^3.0.3",
Expand Down Expand Up @@ -37,35 +86,5 @@
"karma-spec-reporter": "0.0.26",
"load-grunt-tasks": "^3.4.0",
"time-grunt": "^1.3.0"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"server": "grunt serve",
"postinstall": "bower install",
"pretest": "npm install",
"test": "karma start test/karma.conf.js",
"test-single-run": "karma start test/karma.conf.js --single-run"
},
"description": "A pure web-based frontend to a docker-registry",
"main": "Gruntfile.js",
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "[email protected]:kwk/docker-registry-frontend.git"
},
"keywords": [
"docker",
"registry",
"frontend",
"ui"
],
"author": "Konrad Kleine",
"license": "MIT",
"bugs": {
"url": "https://github.com/kwk/docker-registry-frontend/issues"
}
}
1 change: 1 addition & 0 deletions test/init-smart-table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ng = angular;
Loading