-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from NYULibraries/stage
browse by category
- Loading branch information
Showing
97 changed files
with
4,487 additions
and
4,815 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
node_modules |
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,28 @@ | ||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 2017 | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
] | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"esversion": 8, | ||
"node": true, | ||
"globalstrict": true, | ||
"unused": true, | ||
"undef": true | ||
} |
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,36 @@ | ||
# Usage example | ||
# 1) Build container image | ||
# $ docker build -t nyudlts/aco:latest . | ||
# 2) Run container | ||
# $ docker run -d --name=aco -p 8000:80 nyudlts/aco:latest | ||
|
||
# Stage 1 | ||
FROM node:10.15.1 as node | ||
|
||
RUN apt-get update -qq \ | ||
&& apt-get install -y build-essential ruby-full \ | ||
&& gem install compass | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY . . | ||
|
||
RUN npm install -g grunt-cli \ | ||
&& npm install \ | ||
&& npm run-script build-docker | ||
|
||
# Stage 2 | ||
FROM httpd:2.4-alpine | ||
|
||
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf | ||
|
||
RUN { \ | ||
echo 'IncludeOptional conf.d/*.conf'; \ | ||
} >> /usr/local/apache2/conf/httpd.conf \ | ||
&& mkdir /usr/local/apache2/conf.d | ||
|
||
COPY --from=node /usr/src/app/build /usr/local/apache2/htdocs/aco | ||
|
||
COPY --from=node /usr/src/app/source/robots.txt /usr/local/apache2/htdocs/robots.txt | ||
|
||
COPY ./httpd.conf /usr/local/apache2/conf.d/aco.conf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
module.exports = function(grunt) { | ||
module.exports = function (grunt) { | ||
|
||
/** task to run */ | ||
var tasks = ['clean', 'copy', 'uglify', 'compass', 'curl', 'writeHTML'] ; | ||
const tasks = ['clean', 'copy', 'uglify', 'compass', 'curl', 'writeHTML']; | ||
|
||
var configuration = require('./Gruntconfigurations'); | ||
var taskConfiguration = { | ||
const configuration = require('./Gruntconfigurations'); | ||
|
||
let taskConfiguration = { | ||
pkg: grunt.file.readJSON('package.json'), | ||
clean: configuration.clean(), | ||
copy: configuration.copy(), | ||
uglify: configuration.uglify(), | ||
watch: configuration.watch(), | ||
compass : configuration.compass() | ||
clean: configuration.clean(), | ||
copy: configuration.copy(), | ||
uglify: configuration.uglify(), | ||
watch: configuration.watch(), | ||
compass: configuration.compass() | ||
}; | ||
|
||
if (grunt.file.isFile( __dirname + '/source/json/curl.json')) { | ||
taskConfiguration.curl = configuration.curl(); | ||
if (grunt.file.isFile(`${__dirname}/source/json/curl.js`)) { | ||
taskConfiguration.curl = configuration.curl(); | ||
} | ||
|
||
/** project configuration */ | ||
grunt.initConfig(taskConfiguration); | ||
/** load modules and tasks */ | ||
grunt.loadNpmTasks('grunt-curl'); | ||
|
||
/** load modules and tasks */ | ||
grunt.loadNpmTasks('grunt-curl'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-compass'); | ||
grunt.loadNpmTasks('grunt-contrib-compass'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-writeHTML'); | ||
require('./lib/task')(grunt); | ||
|
||
/** register the task */ | ||
grunt.registerTask('default', tasks) ; | ||
grunt.registerTask('default', tasks); | ||
|
||
}; |
Oops, something went wrong.