Skip to content

Commit 3f840e7

Browse files
authored
Maint/modernize simple (#52)
* Refactor Build Remove .gitmodules Remove Ruby sass - add Dart sass Update packages Update linting for quotes * Add gh-pages to deploy directly * Update package scripts * Remove grunt-gh-pages * Update prod build * Updated Dockerfile * Update README.md * Add CNAME File
1 parent ee6bfcd commit 3f840e7

11 files changed

Lines changed: 1051 additions & 933 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ styles/*.map
6666
.grunt
6767
bower_components
6868

69+
backup
70+
.vscode
71+
docs

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

.jshintrc

Lines changed: 84 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,86 @@
11
{
2-
"asi" : false, // If automatic semicolon insertion should be tolerated.
3-
"bitwise" : true, // If bitwise operators should not be allowed.
4-
"boss" : false, // If advanced usage of assignments should be allowed.
5-
"browser" : true, // If the standard browser globals should be predefined.
6-
"camelcase" : false, // If identifiers should be required in camel case.
7-
"couch" : false, // If CouchDB globals should be predefined.
8-
"curly" : true, // If curly braces around all blocks should be required.
9-
"debug" : false, // If debugger statements should be allowed.
10-
"devel" : true, // If logging globals should be predefined (console, alert, etc.).
11-
"dojo" : false, // If Dojo Toolkit globals should be predefined.
12-
"eqeqeq" : false, // If === should be required.
13-
"eqnull" : false, // If == null comparisons should be tolerated.
14-
"es3" : true, // If ES3 syntax should be allowed.
15-
"esnext" : true, // If es.next specific syntax should be allowed.
16-
"evil" : false, // If eval should be allowed.
17-
"expr" : false, // If ExpressionStatement should be allowed as Programs.
18-
"forin" : true, // If for in statements must filter.
19-
"funcscope" : false, // If only function scope should be used for scope tests.
20-
"gcl" : false, // If JSHint should be compatible with Google Closure Linter.
21-
"globalstrict" : false, // If global "use strict"; should be allowed (also enables 'strict').
22-
"immed" : true, // If immediate invocations must be wrapped in parens.
23-
"indent" : 4, // Tab width for your code.
24-
"iterator" : false, // If the `__iterator__` property should be allowed.
25-
"jquery" : true, // If jQuery globals should be predefined.
26-
"lastsemic" : false, // If semicolons may be ommitted for the trailing statements inside of a one-line blocks.
27-
"latedef" : true, // Warn if the variable is used before its definition.
28-
"laxbreak" : false, // If line breaks should not be checked.
29-
"laxcomma" : false, // If line breaks should not be checked around commas.
30-
"loopfunc" : false, // If functions should be allowed to be defined within loops.
31-
"maxcomplexity" : 50, // {int} Maximum cyclomatic complexity per function.
32-
"maxdepth" : 5, // {int} Maximum nested block depth per function.
33-
"maxerr" : false, // {int} Maximum number of errors.
34-
"maxlen" : 1000, // {int} maximum length of a line.
35-
"maxparams" : 5, // {int} Maximum params per function.
36-
"maxstatements" : 50, // {int} Maximum statements per function.
37-
"mootools" : false, // If MooTools globals should be predefined.
38-
"moz" : false, // If mozilla specific syntax should be allowed.
39-
"multistr" : false, // Allow multiline strings.
40-
"newcap" : true, // If constructor names must be capitalized.
41-
"noarg" : true, // If arguments.caller and arguments.callee should be disallowed.
42-
"node" : true, // If the Node.js environment globals should be predefined.
43-
"noempty" : true, // If empty blocks should be disallowed.
44-
"nomen" : false, // If names should be checked.
45-
"nonew" : true, // If using `new` for side-effects should be disallowed.
46-
"nonstandard" : false, // If non-standard (but widely adopted) globals should be predefined.
47-
"onecase" : false, // If one case switch statements should be allowed.
48-
"onevar" : true, // One var statement per function.
49-
"passfail" : false, // If the scan should stop on first error.
50-
"phantom" : false, // If PhantomJS symbols should be allowed.
51-
"plusplus" : false, // If increment/decrement should not be allowed.
52-
"predef" : false, // An array of strings, the names of predefined global variables, or an object whose keys are global variable names, and whose values are booleans that determine if each variable is assignable.
53-
"proto" : false, // If the `__proto__` property should be allowed.
54-
"prototypejs" : false, // If Prototype and Scriptaculous globals should be predefined.
55-
"quotmark" : true, // Enforce the consistency of quotation marks: 'single'|'double'|true.
56-
"regexdash" : false, // If unescaped first/last dash (-) inside brackets should be tolerated.
57-
"regexp" : true, // If the . should not be allowed in regexp literals.
58-
"rhino" : false, // If the Rhino environment globals should be predefined.
59-
"scripturl" : false, // If script-targeted URLs should be tolerated.
60-
"shadow" : false, // If variable shadowing should be tolerated.
61-
"shelljs" : false, // If ShellJS globals should be predefined.
62-
"smarttabs" : true, // If smarttabs should be tolerated (http://www.emacswiki.org/emacs/SmartTabs).
63-
"strict" : false, // Require the "use strict"; pragma.
64-
"sub" : false, // If all forms of subscript notation are tolerated.
65-
"supernew" : false, // If `new function () { ... };` and `new Object;` should be tolerated.
66-
"trailing" : true, // If trailing whitespace rules apply.
67-
"typed" : true, // If typed array globals should be predefined.
68-
"undef" : true, // If variables should be declared before used.
69-
"unused" : false, // Warn if variables are unused..
70-
"validthis" : false, // If 'this' inside a non-constructor function is valid. This is a function scoped option only..
71-
"white" : false, // If strict whitespace rules apply.
72-
"withstmt" : false, // If with statements should be allowed.
73-
"worker" : false, // If Web Worker script symbols should be allowed.
74-
"wsh" : false, // If the Windows Scripting Host environment globals should be predefined.
75-
"yui" : false, // YUI variables should be predefined.
76-
"globals" : { // A map of global variables, with keys as names and a boolean value to determine if they are assignable.
77-
"JSV": true,
78-
"JSON": true,
79-
"URI": true,
80-
"d3": false,
81-
"tv4": false,
82-
"hljs": false,
83-
"jsonpointer": false
84-
}
2+
"asi": false, // If automatic semicolon insertion should be tolerated.
3+
"bitwise": true, // If bitwise operators should not be allowed.
4+
"boss": false, // If advanced usage of assignments should be allowed.
5+
"browser": true, // If the standard browser globals should be predefined.
6+
"camelcase": false, // If identifiers should be required in camel case.
7+
"couch": false, // If CouchDB globals should be predefined.
8+
"curly": true, // If curly braces around all blocks should be required.
9+
"debug": false, // If debugger statements should be allowed.
10+
"devel": true, // If logging globals should be predefined (console, alert, etc.).
11+
"dojo": false, // If Dojo Toolkit globals should be predefined.
12+
"eqeqeq": false, // If === should be required.
13+
"eqnull": false, // If == null comparisons should be tolerated.
14+
"es3": true, // If ES3 syntax should be allowed.
15+
"esnext": true, // If es.next specific syntax should be allowed.
16+
"evil": false, // If eval should be allowed.
17+
"expr": false, // If ExpressionStatement should be allowed as Programs.
18+
"forin": true, // If for in statements must filter.
19+
"funcscope": false, // If only function scope should be used for scope tests.
20+
"gcl": false, // If JSHint should be compatible with Google Closure Linter.
21+
"globalstrict": false, // If global "use strict"; should be allowed (also enables 'strict').
22+
"immed": true, // If immediate invocations must be wrapped in parens.
23+
"indent": 4, // Tab width for your code.
24+
"iterator": false, // If the `__iterator__` property should be allowed.
25+
"jquery": true, // If jQuery globals should be predefined.
26+
"lastsemic": false, // If semicolons may be ommitted for the trailing statements inside of a one-line blocks.
27+
"latedef": true, // Warn if the variable is used before its definition.
28+
"laxbreak": false, // If line breaks should not be checked.
29+
"laxcomma": false, // If line breaks should not be checked around commas.
30+
"loopfunc": false, // If functions should be allowed to be defined within loops.
31+
"maxcomplexity": 50, // {int} Maximum cyclomatic complexity per function.
32+
"maxdepth": 5, // {int} Maximum nested block depth per function.
33+
"maxerr": false, // {int} Maximum number of errors.
34+
"maxlen": 1000, // {int} maximum length of a line.
35+
"maxparams": 5, // {int} Maximum params per function.
36+
"maxstatements": 50, // {int} Maximum statements per function.
37+
"mootools": false, // If MooTools globals should be predefined.
38+
"moz": false, // If mozilla specific syntax should be allowed.
39+
"multistr": false, // Allow multiline strings.
40+
"newcap": true, // If constructor names must be capitalized.
41+
"noarg": true, // If arguments.caller and arguments.callee should be disallowed.
42+
"node": true, // If the Node.js environment globals should be predefined.
43+
"noempty": true, // If empty blocks should be disallowed.
44+
"nomen": false, // If names should be checked.
45+
"nonew": true, // If using `new` for side-effects should be disallowed.
46+
"nonstandard": false, // If non-standard (but widely adopted) globals should be predefined.
47+
"onecase": false, // If one case switch statements should be allowed.
48+
"onevar": true, // One var statement per function.
49+
"passfail": false, // If the scan should stop on first error.
50+
"phantom": false, // If PhantomJS symbols should be allowed.
51+
"plusplus": false, // If increment/decrement should not be allowed.
52+
"predef": false, // An array of strings, the names of predefined global variables, or an object whose keys are global variable names, and whose values are booleans that determine if each variable is assignable.
53+
"proto": false, // If the `__proto__` property should be allowed.
54+
"prototypejs": false, // If Prototype and Scriptaculous globals should be predefined.
55+
"quotmark": false, // Do NOT Enforce the consistency of quotation marks: 'single'|'double'|true.
56+
"regexdash": false, // If unescaped first/last dash (-) inside brackets should be tolerated.
57+
"regexp": true, // If the . should not be allowed in regexp literals.
58+
"rhino": false, // If the Rhino environment globals should be predefined.
59+
"scripturl": false, // If script-targeted URLs should be tolerated.
60+
"shadow": false, // If variable shadowing should be tolerated.
61+
"shelljs": false, // If ShellJS globals should be predefined.
62+
"smarttabs": true, // If smarttabs should be tolerated (http://www.emacswiki.org/emacs/SmartTabs).
63+
"strict": false, // Require the "use strict"; pragma.
64+
"sub": false, // If all forms of subscript notation are tolerated.
65+
"supernew": false, // If `new function () { ... };` and `new Object;` should be tolerated.
66+
"trailing": true, // If trailing whitespace rules apply.
67+
"typed": true, // If typed array globals should be predefined.
68+
"undef": true, // If variables should be declared before used.
69+
"unused": false, // Warn if variables are unused..
70+
"validthis": false, // If 'this' inside a non-constructor function is valid. This is a function scoped option only..
71+
"white": false, // If strict whitespace rules apply.
72+
"withstmt": false, // If with statements should be allowed.
73+
"worker": false, // If Web Worker script symbols should be allowed.
74+
"wsh": false, // If the Windows Scripting Host environment globals should be predefined.
75+
"yui": false, // YUI variables should be predefined.
76+
"globals": {
77+
// A map of global variables, with keys as names and a boolean value to determine if they are assignable.
78+
"JSV": true,
79+
"JSON": true,
80+
"URI": true,
81+
"d3": false,
82+
"tv4": false,
83+
"hljs": false,
84+
"jsonpointer": false
85+
}
8586
}

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mdtools.adiwg.org

Dockerfile

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,15 @@
1-
FROM node:14 as build
1+
FROM node:16 as build
22
WORKDIR /src
33

4-
ARG RUBY_VERSION=2.7.7
5-
ARG RUBY_VARIANT=jemalloc
6-
ARG DEBIAN_VERSION=10
7-
8-
RUN apt-get update -q \
9-
&& apt-get dist-upgrade --assume-yes \
10-
&& apt-get install --assume-yes -q --no-install-recommends \
11-
curl \
12-
gnupg \
13-
apt-transport-https \
14-
ca-certificates \
15-
build-essential \
16-
&& curl -SLf https://raw.githubusercontent.com/fullstaq-labs/fullstaq-ruby-server-edition/main/fullstaq-ruby.asc | apt-key add - \
17-
&& echo "deb https://apt.fullstaqruby.org debian-${DEBIAN_VERSION} main" > /etc/apt/sources.list.d/fullstaq-ruby.list \
18-
&& apt-get update -q \
19-
&& apt-get install --assume-yes -q --no-install-recommends fullstaq-ruby-${RUBY_VERSION}-${RUBY_VARIANT} \
20-
&& apt-get autoremove --assume-yes \
21-
&& rm -rf /var/lib/apt/lists \
22-
&& rm -fr /var/cache/apt \
23-
&& rm /etc/apt/sources.list.d/fullstaq-ruby.list
24-
25-
ENV GEM_HOME /usr/local/bundle
26-
ENV BUNDLE_PATH="$GEM_HOME" \
27-
BUNDLE_SILENCE_ROOT_WARNING=1 \
28-
BUNDLE_APP_CONFIG="$GEM_HOME" \
29-
RUBY_VERSION=${RUBY_VERSION}-${RUBY_VARIANT} \
30-
LANG=C.UTF-8 LC_ALL=C.UTF-8
31-
32-
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
33-
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:/usr/lib/fullstaq-ruby/versions/${RUBY_VERSION}/bin:$PATH
34-
35-
COPY Gemfile /src/.
36-
COPY Gemfile.lock /src/.
37-
RUN bundle install && gem install sass
38-
394
COPY package.json /src/.
405
COPY package-lock.json /src/.
416
RUN npm install
427

43-
COPY bower.json /src/.
44-
RUN npx bower install
45-
468
COPY . /src/.
479
RUN npx grunt prod
4810

4911
# Final image will only contain the following
5012
FROM pierrezemb/gostatic
51-
COPY --from=build /src/prod/ /srv/http/
13+
COPY --from=build /src/docs/ /srv/http/
5214

5315
CMD ["-fallback", "/index.html"]

Gemfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)