Skip to content

Instantly share code, notes, and snippets.

@arnirjhor
arnirjhor / general_article.json
Last active April 18, 2018 12:53
Json format for general article
{
"id": 10282110282,
"createdAt": 1505356557019,
"updatedAt": 1603032029393,
"category": "thailand",
"subCategory": "krabi",
"title": "13 Affordable Romantic Fine Dining Restaurants in jakarta with Main Under $15",
"author": {
"name": "sten ivan",
"profession": "travel writer",
@arnirjhor
arnirjhor / webpack.config.js
Last active October 3, 2017 05:39
Webpack Quickstarter Template - Final
const path = require('path'),
webpack = require('webpack'),
CleanWebpackPlugin = require('clean-webpack-plugin'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractPlugin = new ExtractTextPlugin({ filename: './assets/css/app.css' });
const config = {
@arnirjhor
arnirjhor / webpack.config.js
Created October 2, 2017 12:29
Webpack config file basic setup - 7
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');
const extractPlugin = new ExtractTextPlugin({ filename: './assets/css/app.css' });
const config = {
@arnirjhor
arnirjhor / webpack.config.js
Created October 2, 2017 11:57
Webpack config file basic setup - 6
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const webpack = require('webpack');
const extractPlugin = new ExtractTextPlugin({ filename: './assets/css/app.css' });
const config = {
@arnirjhor
arnirjhor / webpack.config.js
Last active October 1, 2017 09:29
Webpack config file basic setup - 5
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const config = {
context: path.resolve(__dirname, 'src'),
entry: {
// removing 'src' directory from entry point, since 'context' is taking care of that
app: './app.js'
@arnirjhor
arnirjhor / .babelrc
Created October 1, 2017 09:22
Configuring .babelrc file
{
"presets": ["env"]
}
@arnirjhor
arnirjhor / webpack.config.js
Created October 1, 2017 08:48
Webpack config file basic setup - 4
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const config = {
context: path.resolve(__dirname, 'src'),
entry: {
// removing 'src' directory from entry point, since 'context' is taking care of that
app: './app.js'
},
@arnirjhor
arnirjhor / webpack.config.js
Created October 1, 2017 08:12
Webpack config file basic setup - 3
const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const config = {
context: path.resolve(__dirname, 'src'),
entry: {
// removing 'src' directory from entry point, since 'context' is taking care of that
app: './app.js'
},
output: {
@arnirjhor
arnirjhor / package.json
Created October 1, 2017 06:15
package.json file for webpack quickstart
{
"name": "project_name",
"version": "1.0.0",
"description": "Webpack 3 quickstarter",
"main": "app.js",
"scripts": {
"build": "./node_modules/.bin/webpack",
"build:prod": "./node_modules/.bin/webpack -p",
"watch": "./node_modules/.bin/webpack --watch",
"dev": "./node_modules/.bin/webpack-dev-server"
@arnirjhor
arnirjhor / webpack.config.js
Created October 1, 2017 06:11
Webpack config file basic setup - 2
const path = require('path');
const config = {
context: path.resolve(__dirname, 'src'),
entry: {
// removing 'src' directory from entry point, since 'context' is taking care of that
app: './app.js'
},
output: {
path: path.resolve(__dirname, 'dist'),