-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
6,582 additions
and
908 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,4 @@ | ||
assets/build/**/*.js | ||
assets/vendor/**/*.js | ||
assets/components/**/main.js | ||
assets/components/**/rollup.config.js |
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,29 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"amd": true, | ||
"node": true | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2019, | ||
"sourceType": "module", | ||
"requireConfigFile": false, | ||
"babelOptions": { | ||
"babelrc": false, | ||
"configFile": false | ||
} | ||
}, | ||
"plugins": ["svelte3"], | ||
"extends": ["eslint:recommended"], | ||
"overrides": [ | ||
{ | ||
"files": ["assets/components/**/*.svelte"], | ||
"processor": "svelte3/svelte3" | ||
} | ||
], | ||
"rules": { | ||
// ... | ||
} | ||
} |
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 @@ | ||
blank_issues_enabled: false |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "" |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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 @@ | ||
{ | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"plugins": ["prettier-plugin-svelte"] | ||
} |
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,13 +1,26 @@ | ||
FROM nginx:latest | ||
|
||
# Packages | ||
RUN apt-get update && apt-get install -y \ | ||
git | ||
RUN apt-get update && apt-get install -yq \ | ||
git \ | ||
curl | ||
|
||
# Install NodeJS | ||
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ | ||
&& apt-get install -y nodejs | ||
|
||
# fix npm - not the latest version installed by apt-get | ||
RUN npm install -g npm | ||
|
||
# Directories and Files | ||
RUN rm -rf /usr/share/nginx/html/* | ||
RUN git clone https://github.com/agung2001/agung2001.github.io.git /usr/share/nginx/html | ||
WORKDIR /usr/share/nginx/html | ||
|
||
# NPM Install | ||
RUN npm i --force | ||
RUN node index.js | ||
RUN npx grunt | ||
|
||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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,101 +1,98 @@ | ||
/** Load Javascript Library */ | ||
const path = require("path"); | ||
|
||
/** | ||
* Components Scripts | ||
* */ | ||
const components = ['content']; | ||
const components = ['content'] | ||
const getShellComponents = () => { | ||
let shell = {}; | ||
components.map((c) => { | ||
let command = { command: `npx rollup -c assets/components/${c}/rollup.config.js` }; | ||
shell[`rollup_component_${c}`] = command; | ||
}); | ||
return shell; | ||
}; | ||
let shell = {} | ||
components.map((c) => { | ||
let command = { | ||
command: `npx rollup -c assets/components/${c}/rollup.config.js`, | ||
} | ||
shell[`rollup_component_${c}`] = command | ||
}) | ||
return shell | ||
} | ||
const getWatcherComponents = () => { | ||
let watcher = {}; | ||
components.map((c) => { | ||
let FilesTasks = { | ||
files: [ | ||
`assets/components/${c}/**/*.js`, | ||
`assets/components/${c}/**/*.svelte`, | ||
], | ||
tasks: [`build-component-${c}`, 'build-css'] | ||
}; | ||
watcher[`component_${c}`] = FilesTasks; | ||
}); | ||
return watcher; | ||
}; | ||
|
||
module.exports = function(grunt) { | ||
let watcher = {} | ||
components.map((c) => { | ||
let FilesTasks = { | ||
files: [ | ||
`assets/components/${c}/**/*.js`, | ||
`assets/components/${c}/**/*.svelte`, | ||
], | ||
tasks: [`build-component-${c}`, 'build-css'], | ||
} | ||
watcher[`component_${c}`] = FilesTasks | ||
}) | ||
return watcher | ||
} | ||
|
||
/** Configuration */ | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
module.exports = function (grunt) { | ||
/** Configuration */ | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
/** Compile TailwindCSS - Cross Platform */ | ||
shell: { | ||
...getShellComponents(), | ||
nodesandedges: { command: 'node index.js'}, | ||
npm_tailwind: { command: | ||
`npx tailwindcss build assets/css/tailwind/style.css -o assets/build/css/tailwind.min.css --silent && ` + | ||
`node tailwindcsssupport.js` | ||
} | ||
}, | ||
|
||
/** CSS Minify */ | ||
cssmin: { | ||
options: { | ||
mergeIntoShorthands: false, | ||
roundingPrecision: -1 | ||
}, | ||
target: { | ||
files: { | ||
"assets/build/css/tailwind.min.css" : "assets/build/css/tailwind.min.css" | ||
} | ||
} | ||
}, | ||
/** Compile TailwindCSS - Cross Platform */ | ||
shell: { | ||
...getShellComponents(), | ||
nodesandedges: { command: 'node index.js' }, | ||
npm_tailwind: { | ||
command: | ||
`npx tailwindcss build assets/css/tailwind/style.css -o assets/build/css/tailwind.min.css --silent && ` + | ||
`node tailwindcsssupport.js`, | ||
}, | ||
}, | ||
|
||
/** Configure watch task */ | ||
watch: { | ||
options: { | ||
livereload: true, | ||
}, | ||
config: { | ||
files: [ | ||
'config.json' | ||
], | ||
tasks: ['build'] | ||
}, | ||
css: { | ||
files: [ | ||
'assets/css/**/*.scss', | ||
'assets/css/**/*.css', | ||
'index.html' | ||
], | ||
tasks: ['build-css'] | ||
}, | ||
...getWatcherComponents(), | ||
/** CSS Minify */ | ||
cssmin: { | ||
options: { | ||
mergeIntoShorthands: false, | ||
roundingPrecision: -1, | ||
}, | ||
target: { | ||
files: { | ||
'assets/build/css/tailwind.min.css': | ||
'assets/build/css/tailwind.min.css', | ||
}, | ||
}); | ||
}, | ||
}, | ||
|
||
/** Load Plugin */ | ||
grunt.loadNpmTasks('grunt-shell'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
/** Configure watch task */ | ||
watch: { | ||
options: { | ||
livereload: true, | ||
}, | ||
config: { | ||
files: ['config.json'], | ||
tasks: ['build'], | ||
}, | ||
css: { | ||
files: ['assets/css/**/*.scss', 'assets/css/**/*.css', 'index.html'], | ||
tasks: ['build-css'], | ||
}, | ||
...getWatcherComponents(), | ||
}, | ||
}) | ||
|
||
/** Component */ | ||
let componentsID = []; | ||
components.map((c) => { | ||
componentsID.push(`build-component-${c}`); | ||
grunt.registerTask(`build-component-${c}`, [ `shell:rollup_component_${c}` ]); | ||
}); | ||
/** Load Plugin */ | ||
grunt.loadNpmTasks('grunt-shell') | ||
grunt.loadNpmTasks('grunt-contrib-watch') | ||
grunt.loadNpmTasks('grunt-contrib-cssmin') | ||
|
||
/** Register Tasks */ | ||
grunt.registerTask('build-css', ['shell:npm_tailwind', 'cssmin']); | ||
grunt.registerTask('build-js', [ ...componentsID ]); | ||
grunt.registerTask('build', ['build-css', 'build-js']); | ||
grunt.registerTask('default', ['build-css', 'build-js', 'shell:nodesandedges']); | ||
/** Component */ | ||
let componentsID = [] | ||
components.map((c) => { | ||
componentsID.push(`build-component-${c}`) | ||
grunt.registerTask(`build-component-${c}`, [`shell:rollup_component_${c}`]) | ||
}) | ||
|
||
}; | ||
/** Register Tasks */ | ||
grunt.registerTask('build-css', ['shell:npm_tailwind', 'cssmin']) | ||
grunt.registerTask('build-js', [...componentsID]) | ||
grunt.registerTask('build', ['build-css', 'build-js']) | ||
grunt.registerTask('default', [ | ||
'build-css', | ||
'build-js', | ||
'shell:nodesandedges', | ||
]) | ||
} |
Oops, something went wrong.