diff --git a/Gulpfile.js b/Gulpfile.js new file mode 100644 index 0000000..626f597 --- /dev/null +++ b/Gulpfile.js @@ -0,0 +1,94 @@ +var gulp = require('gulp'); + +var autoprefixer = require('gulp-autoprefixer'); +var browserSync = require('browser-sync').create(); +var clean = require('gulp-clean'); +var cleanCSS = require('gulp-clean-css'); +var pump = require('pump'); +var rename = require("gulp-rename"); +var sass = require('gulp-sass'); +var sourcemaps = require('gulp-sourcemaps'); +var uglify = require('gulp-uglify'); +var gzip = require('gulp-gzip'); + +var input = ['./public/sass/**/*.scss']; +var output = './public/dist'; + +var pkg = require('./package.json'); + +var autoprefixerOptions = { + browsers: ['last 2 versions', '> 5%', 'Firefox ESR'] +}; + +var sassOptions = { + outputStyle: 'compact' +}; + +gulp.task('clean', function() { + return gulp.src([output], { read: false }) + .pipe(clean({ force: true })); +}); + +gulp.task('serve', ['simple-sass'], function() { + + browserSync.init({ + port: 3000, + server: "./public" + }); + + gulp.watch(input, ['simple-sass']); + gulp.watch("./public/*.html").on('change', browserSync.reload); +}); + +gulp.task('simple-sass', function() { + return gulp + .src(input) + .pipe(sass(sassOptions).on('error', sass.logError)) + .pipe(autoprefixer(autoprefixerOptions)) + .pipe(gulp.dest('./public/dist')) + .pipe(browserSync.stream()); +}); + +gulp.task('sass', ['clean'], function() { + return gulp + .src(input) + .pipe(sass(sassOptions)) + .pipe(autoprefixer(autoprefixerOptions)) + .pipe(gulp.dest(output)); +}); + +// gulp.task('uglify-js', ['clean'], function(cb) { + +// var uglifyOptions = { +// mangle: true, +// preserveComments: 'license' +// }; + +// pump([ +// gulp.src('./src/*.js'), +// uglify(), +// gzip(), +// gulp.dest(output) +// ], cb); + +// }); + +gulp.task('rename', ['sass'], function() { + return gulp.src(["./public/dist/*.css", "./public/dist/*.js"]) + .pipe(rename(function(path) { + path.basename += ".min"; + })) + .pipe(gulp.dest(output)); +}); + +gulp.task('minify-css', ['rename'], function() { + return gulp.src('./public/dist/*.min.css') + .pipe(cleanCSS({ compatibility: 'ie8' })) + .pipe(gzip()) + .pipe(gulp.dest(output)); +}); + + +gulp.task('build:prod', ['clean', 'sass', 'rename', 'minify-css']); +gulp.task('build:dev', ['clean', 'sass', 'serve']); +gulp.task('default', ['build:dev']); diff --git a/package.json b/package.json new file mode 100644 index 0000000..09846b6 --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "jvmdeveloper.id", + "description": "Homepage for JVMDeveloperID", + "version": "0.0.1", + "keywords": [ + "java", + "jvm", + "community", + "indonesia" + ], + "homepage": "https://jvmdeveloper.id", + "author": "JVMDeveloperID (https://github.com/JVMDeveloperID/)", + "scripts": { + "dev": "gulp build:dev", + "prod": "gulp build:prod", + "dist": "gulp build:prod", + "test": "echo \"Error: no test specified\" && exit 0" + }, + "repository": { + "type": "git", + "url": "https://github.com/JVMDeveloperID/jvmdeveloper.id.git" + }, + "bugs": { + "url": "https://github.com/JVMDeveloperID/jvmdeveloper.id/issues" + }, + "engines": { + "node": ">=6" + }, + "license": "MIT", + "dependencies": {}, + "devDependencies": { + "autoprefixer": "^7.1.6", + "browser-sync": "^2.18.13", + "gulp": "^3.9.1", + "gulp-autoprefixer": "^4.0.0", + "gulp-clean": "^0.3.2", + "gulp-clean-css": "^3.9.0", + "gulp-connect": "^5.0.0", + "gulp-gzip": "^1.4.0", + "gulp-rename": "^1.2.2", + "gulp-sass": "^3.1.0", + "gulp-sourcemaps": "^2.6.1", + "gulp-uglify": "^3.0.0", + "gulp-watch": "^4.3.11", + "pump": "^1.0.3" + } +} diff --git a/public/dist/main.css b/public/dist/main.css new file mode 100644 index 0000000..d785ca9 --- /dev/null +++ b/public/dist/main.css @@ -0,0 +1,4 @@ +/* +@author: Irfan Maulana +@github: https://github.com/mazipan/ +*/ diff --git a/public/dist/main.min.css b/public/dist/main.min.css new file mode 100644 index 0000000..d785ca9 --- /dev/null +++ b/public/dist/main.min.css @@ -0,0 +1,4 @@ +/* +@author: Irfan Maulana +@github: https://github.com/mazipan/ +*/ diff --git a/public/dist/main.min.css.gz b/public/dist/main.min.css.gz new file mode 100644 index 0000000..d210671 Binary files /dev/null and b/public/dist/main.min.css.gz differ diff --git a/public/images/jvmdeveloperid.jpg b/public/images/jvmdeveloperid.jpg new file mode 100644 index 0000000..7741fdf Binary files /dev/null and b/public/images/jvmdeveloperid.jpg differ diff --git a/public/index.html b/public/index.html index 5a8ff8a..9249d79 100644 --- a/public/index.html +++ b/public/index.html @@ -1,69 +1,75 @@ - - - Welcome to Firebase Hosting - - - -
-

Welcome to Firebase Hosting

-

You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

- + + + + + JVMDeveloperID + + + + + + + + + + + + + + +
+
+
+ +
+ +
+ +

+ JVMDeveloperID +

+

+ Komunitas pengguna dan developer JVM Indonesia +

+ + +   Github + + + +   Telegram + + + +   Facebook + + +
- - +
+ +
+ +
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/public/sass/main.scss b/public/sass/main.scss new file mode 100644 index 0000000..7dc4031 --- /dev/null +++ b/public/sass/main.scss @@ -0,0 +1,5 @@ +/* +@author: Irfan Maulana +@github: https://github.com/mazipan/ +*/ + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..b723dde --- /dev/null +++ b/readme.md @@ -0,0 +1,12 @@ +# jvmdeveloper.id +Homepage for JVMDeveloperID + +## Homepage +https://jvmdeveloper.id/ + +## Development ++ Clone `git clone https://github.com/JVMDeveloperID/jvmdeveloper.id.git` ++ Download and install NodeJs : https://nodejs.org/en/download/ ++ Install dependencies : `npm install` or `yarn install` ++ Serve page : `npm run dev` ++ Build static file : `npm run dist` or `npm run prod` \ No newline at end of file