Skip to content

Instantly share code, notes, and snippets.

View pavtaras's full-sized avatar
💭
working in another account

Pavel Tarasenka pavtaras

💭
working in another account
  • Godel Technologies Europe
  • Belarus
View GitHub Profile
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
@pavtaras
pavtaras / webpack.config.js
Created May 15, 2017 07:08
Webpack config for AngularJS apps
var webpack = require('webpack'),
path = require('path');
module.exports = function(env){
env = env || {};
var isProd = env.isProd || false;
var config = {
context: path.resolve("./src"),
entry: {
@pavtaras
pavtaras / CurrentUser.factory.js
Created December 12, 2016 06:54
Angular 1 authentication
angular.module('mod').factory('CurrentUser', function($q, $timeout, ApiRequest){
var _identity = null,
deferred = null;
return {
isAuthenticated: function(){
return !!_identity;
},
getIdentity: function(){
return _identity;
var path = require('path'),
webpack = require('webpack'),
ExtractTextPlugin = require("extract-text-webpack-plugin"),
ngAnnotatePlugin = require('ng-annotate-webpack-plugin');;
var isDevMode = process.env.NODE_ENV === 'development';
var exportObj = {
context: path.join(__dirname, 'frontend'),
entry: {