Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Apologies if this had been covered. One of or devs wants to use AngularJS for or ecommerce site. Watching the egghead.io videos it seems AngularJS (and the other frameworks in this thread) are meant for generating, then manipulating, content.
Isn't that terrible for SEO since I think bots don't run JavaScript?

Adbot
ADBOT LOVES YOU

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Sagacity posted:

Which line of business are you in, in which clients don't use IE8 anymore?
Presumably one where they don't use XP because it's discontinued, and the auto update process has them on IE10 or IE11

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
So I'm starting a new project from scratch using Foundation and SASS. Should my entire site be in app.css? That seems a bit bulky to have CSS for elements on one page loaded on all pages. Is a suggestion way to have app.css really just be for elements like .columns, <p>, <h1>, and not .myWidgetContainer, #thingOnOnlyOnePage etc?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

The Milkman posted:

Not to mention the browser will cache that huge singular CSS file after the first load anyway
That's actually my fear, we create/update pages a lot so I'd hate for either:
A) the older app.css file to be cached and the page be broken or
B) The user needs to redownload the large app.css every time we make/update a page (that they may not even visit).

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I'm having this exact same problem http://stackoverflow.com/questions/26252266/sass-throwing-errors-about-things-it-should-not in my case it's _grid.css from Foundation 4 (which I haven't touched since in almost a year and it compiled fine back then)
The "solution" is just to downgrade SASS?
But to what version? How do I even do that?

All these SASS GULP things are supposed to make font-end development easier, but getting them set up and configured is so obtuse with mysterious command lines I feel like I'm using mid-90s Linux :argh:

EDIT: NEVERMIND I looked it up and ran more command line BS to downgrade to random version that worked. It's still stupid though :colbert:

The Merkinman fucked around with this message at 17:51 on Feb 19, 2015

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
*a developer tries {thing} feels it's too complicated, decides to make their own {new thing}*
*{new thing} gets popular with others*
*{new thing} adds features others want*
*{new thing} becomes rapidly changing, confusing, mess*
*a developer tries {new thing} feels it's too complicated, decides to make their own {newer thing}...*

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Maluco Marinero posted:

... considering Ember won't be abandoned for 2.0 with no migration path.

If this is a reference to Angular, I thought the reason there currently wasn't a migration path from 1.3 to 2.0 is because 2.0 isn't done yet. Therefore, it's pointless to create a path to a moving target.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
What is a good resource for learning AngularJS? Having to pay $ for it is fine. I've done the free Shaping Up with Angular codeschool course, but at this point I'm not sure what direction to go, especially given the whole 1.3 -> 2.0 thing.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
http://i.imgur.com/v9prDJt.gif That's pretty much the discussions in this thread right?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I may have asked this before and I apologize if I have:
I'm looking to get into this more advanced front-end development, specifically AngularJS. Should I learn 1.X or 2.X? The only experience I have with it is the Shaping Up With Angular.js tutorial which I've all of forgotten at this point anyway. I Know I'd have to 'un-learn' a lot of stuff going from 1 -> 2 ,but I would think 1 would have better resources available.

tl;dr
Should I learn AngularJS 1.X or 2.X?
What resources, like an online course, would be good to learn it?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Karthe posted:

I did some "research" into this (in so much as I googled around a bit) and came away with the idea that 1.x isn't going anywhere for a couple of years at least. TONS of existing projects use 1.x (obviously), and the Angular people have said that they'll support both 1.x and 2.x for the foreseeable future. Therefore you should be fine picking up 1.x now, and try to stick to most of the practices featured in this style guide: https://github.com/johnpapa/angular-styleguide. They'll get you away from relying on $scope for everything, which will be especially useful whenever you start diving into 2.x.

As for resources, Codecademy has a decent Angular course to get you started: https://www.codecademy.com/learn/learn-angularjs

Skandranon posted:

I would start with AngularJS 1.X, with an eye for doing things closer to how Angular 2 works. There are a lot of things that have built up in Angular 1.X that are bad, but can be avoided (like using $scope). Only having 2.0 experience would be almost useless right now, whereas there will be 1.X apps to work on for many years to come. Also, take a look at TypeScript, it works well with 1.X, and will get you pretty close to working as if you were using 2.0, and will make the transition fairly smooth when it does happen.

As for good resources for using TypeScript with AngularJS... I've never really found any, it's all in bits and pieces all over. Feel free to PM me any questions though, I've been in the trenches for a year now with the two and feel I've made some significant progress. Just not the blogging type.




3rd step in Codecademy tutorial posted:

code:
app.controller('MainController', ['$scope', function($scope) { 
  $scope.title = 'Top Sellers in Books'; 
}]);
I hope you mean $scope is okay in some cases.



If that's the case, thanks. You too Skandranon. I was apprehensive in going with AngularJS 1.X, but now I'm not.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Angular 2.0 is now in beta
Given this is Google, it will be out of beta in, what, 3 years?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Skandranon posted:

As opposed to React still being 0.1x after almost 3 years?

Perfectly Cromulent posted:

:rolleyes:

I assume you know nothing about Angular or its history? The RC will be in 6 months or less. 3 years ago, Angular was barely out of the 1.0 release and it has been very actively maintained and updated since then. They will be releasing 1.5 very soon. Oh, and the version numbers here are not at all insignificant. The 2.x releases will be a major departure from the 1.x line and quite deserving of the major version number update.
I just meant it as a joke about how Google has their products in beta for a long period of time :(

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Can someone explain why I'd want to use Gulp/Grunt/Webpack/ thing on github only installable via npm?

I can't tell if it's just beyond my comprehension or just not my use case. I work on a good sized ecommerce (I don't touch the actual checkout logic aside from basic CSS).

EDIT: I should mention that if using these would require a site-wide rewrite, then lol at it ever happening for where I work.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Wow, no action for over a week on this thread?

I've asked before about Gulp, Grunt, etc. If I were to start using them (I still don't know why I would) do I need to make a new site entirely from scratch or could a web site be slowly updated, page by page, to use it?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Lumpy posted:

Skip them and use webpack or plain npm scripts :v:

They *why* is because you want to perform build step from the time you hit 'save' to the time code gets to the browser. For example, when I save a file, webpack:

  • looks at the entry point of my code and gathers up all the imports for me into just what's used
  • transforms my ES6 to "vanilla" js
  • transforms my SASS into css
  • pulls out just the CSS that's actually used
  • autoprefixes that css
  • separates out all my "vendor" code (React, d3, whatever) into a separate file so it can be cached (in production)
  • minifies everything.
  • writes a new index.html for me with all the SCRIPT and LINK tags for the js /css
  • hot reloads my browser (in dev)

Plus probably a bunch of other stuff I forget.

If you write "raw" JS and CSS, then you don't really need that stuff.
Thank you so much for that list.
Our JS is pretty raw, utilizing a lot of jQuery... though we just started using Angular 2.0 (typescript, requirejs) for part of our site.
I already have SCSS to CSS through some compass command thing that I don't even remember how I set up.

So, in general
Is all of this only really useful in DEV, and production wouldn't matter, or it's beneficial there too?
Would I need to start a whole new site-wide rebuild of the entire site to utilize this or could I update as I go (which I was able to do with the SCSS -> app.css workflow)

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Wait, so I shouldn't use Webpack? God dammit I hate this field. By the time I've leaned enough by reading the barebones documentation on a github page and typed in a bunch of npm install in a terminal like a 1990s hacker, then another articles comes along and says don't use X (use Y!). What the gently caress is the point in bothering to learn any of these, especially in my case where I only work on one website?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
OK after the words of encouragement I did the tutorial for Webpack.
It bundles the CSS with the JS and then injects the CSS inline in the head? Isn't that bad and will prevent the CSS file from being cached? Won't that be really bad when I switch it to my minified app.css that has styles for everything on the site?

I'm guessing I'm missing something, but the tutorial ended there.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Anyone have experience with ionic?
One of our developers mentioned it, but he has the habit of waiting to reinvent the wheel with new and shiny and a total disregard for workload and legacy.

Currently, our ecommerce site has a separate "desktop" version, and a "mobile" version that I'm slowly merging codebases of to one, response, site. We do not have an app of any kind, nor any plans to do so.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Wheany posted:

Okay, so it seems progressive web apps are the new hotness right now. And apparently part of that is not compiling everything into one giant monolithic file.
Is it? I thought it was just:
* HTTPS
* Some manner of offline functionality
* Service Worker
* Manifest

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
This is how I feel reading this thread sometimes. :(

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I may have asked this before:
How many of you work in a design firm type of thing, where you're constantly making new/updated sites for a variety of clients
Vs
Working for a company and only updating their site(s)?

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Oh, good thing I haven't fully learned Webpack yet since I'm sure it's completely useless now. Yay Front-end development!

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
What alternate profession do you recommend because I never understand anything in this thread and I feel I never will.

I'm trying, desperately, to maybe try webpack. But even with Lumpy's examples, or this or this,I feel like everything is in Greek and I'd have better luck coding with my forehead hitting the keys. I somehow got a series of specific .js files to concatenate and minify (uglify) to one file. I'd like to get that to gzip as well but... my main issue right now is that I can't for the life of me figure out how to get a bunch of foundation .scss files to output a single, compiled, css file.

Lot of commented out stuff and whatever because I've been redoing this so many times at this point
code:
const path    = require('path');	
const webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
const sassLoaders = [
    'style-loader',
    'css-loader',
    'postcss-loader',
    'sass-loader?includePaths[]=' + path.resolve(__dirname, './src')
]
var webpackUglifyJsPlugin = require('webpack-uglify-js-plugin');
//var CompressionPlugin = require("compression-webpack-plugin");


// might need to include wishlist into bundle
module.exports = {
    entry:  {
		global:['./src/countdown','./src/international','./src/mainNav','./src/miniCart', './src/search']
		//countdown:'./src/countdown',
		//international:'./src/international',
		//mainNav:'./src/mainNav',
		//miniCart:'./src/miniCart',
		//search:'./src/search'
	},
    output: {
        path:     'builds',
		// filename: '[name].js'
        filename: 'ug.js',
    },
    module: {
        loaders: [
			{
				test: /\.scss$/,
				//loaders: sassLoaders
				    loader: ExtractTextPlugin.extract(
						'style', // backup loader when not building .css file
						'css!sass' // loaders to preprocess CSS
				)
			}
        ]
    },	
    plugins: [
		new ExtractTextPlugin("style.css"),
        new webpackUglifyJsPlugin({
			cacheFolder: path.resolve(__dirname, 'public/cached_uglify/'),
			debug: true,
			minimize: false,
			sourceMap: false,
			mangle:false,
			output: {
				comments: false
			},
			compressor: {
				warnings: false
			}
        })
//		,
//		new CompressionPlugin({
//            asset: "[path].gz[query]",
//            algorithm: "gzip",
//            test: /\.js$/,
//            threshold: 10240,
//            minRatio: 0.8
//        })
    ]
};

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

HaB posted:

I can't give you specific help, since I just sat and jacked with it until I got it working, but here's my webpack config:

code:
...
it's from the React starter, ejected and modified by me to include sass support. Don't forget that loader order matters, and they get applied in reverse order. (as to the sheer dumbness/weirdness of that, I'll refrain from offering an opinion).
Also, what's the folder breakdown for that? Maybe my webpack.config.js is looking for scss in the wrong folder.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Lumpy posted:

A couple clarifying questions:

How are you importing / including the Foundation files in your code?

Have you started with a "stupid" version that only has one .js file and the foundation stuff and does everything inline?

currently the folder is (largely from Foundation 5 import and file names changed to protect the innocent):
code:
app
-scss
--myoverridefiles.scss
--moreoverridefiles.scss
--...
-bower_components
--bower_components
---foundation
----scss
-----foundation
------components
-------foundationfile.scss
-------anotherdefaultfoundationfile.scss
-------...
So normally I just browser to /app and run bundle exec compass watch, but that part I'd like to put into webpack

Yes that's a giant mess, so I'm totally find with restructuring if I get this to work.

I'm currently working on a "stupid" version, that's what I've posted so far.
code:
webpack.config.js
src
-jsfilesthatwork.js
-overridesthatgetignored.scss
--foundation
---components
-----foundationcomponentsthatgetignored.scss
-----...

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Lumpy posted:

how are you importing your SCSS in your js?
I'm.. not? I want it to be a separate file with that extractext plugin.

Oh I see, you're saying I should have it that way in the 'stupid' version. Well I just tried can't get that to work either. Oh and my code in the bundle doesn't run onload either (like it does when not bundled). Am I just using webpack for the wrong purpose??

I've tried the documentation, but it's rear end, and the comments are the usual FOSS "hurr durr you have a problem with the docs? improve them yourself"

I can't find any documenation/tutorial on what I'm trying to do so I'm thinking I'm just not understanding the entire concept of Webpack and/or it's not suitable for the website I work on.


Basically I am a 3 year old and anything anyone says might as well be written in Aramaic. I think that's my level of understanding w/r/t any front end framework more advanced that HTML4.

The Merkinman fucked around with this message at 17:37 on Oct 24, 2016

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
That's why I think I'm using Webpack wrong, as in, not for its intended purpose.

We have a bunch of scss files compiled into one, monolithic, app.css (command line compass)
We have a bunch of js files that are included on every page (command line uglifyjs)
We also have some pages with one-off js files or ones used on some pages but not others
We have something, not yet production ready, that uses Angular2 written in TypeScript (Gulp)
We have something, that IS production ready, that uses Knockout written in TypeScript (TypeScript command)

So I was looking for something to use, to do all those things at once, in a standard way rather than every developer re-inventing the wheel.



From your example, it looks like Webpack is only used for a very component-based website, where every bit of functionality has its own .js and scss? As I'm working on one site, all the time, I complete site-wide rewrite all at once would be out of the question (have to do feature, feature, feature!!).

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

HaB posted:

You can still do what you're talking about with webpack, but it might be more trouble than it's worth.

You can chain Gulp/Grunt tasks together into a single "build" or "dev" command. Seems like that might be the easiest way to modify your existing setup

When I asked way back, Lumpy suggested Webpack in the first place <:mad:>

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Cool thread, thanks for being the epitome of modern front-end development and suggesting I try to learn something that is ultimately useless for what I want to accomplish.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
So I'm back to waste more time and feel like an idiot.

I found some tutorial on Webpack (because at this point, why not?) But early on they want you to install webpack-dev-server. It won't install for me and many others due to peer dependencies. It seems the 'fix' is in version 1.15, but AFAIK, the latest stable version of Webpack is still 1.13, so what am I supposed to do? (installing webpack-dev-server locally didn't work either)

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Anony Mouse posted:

Are you using a pre-existing package.json? If so maybe try starting over from scratch and install packages one at a time manually. Could be that the dev dependencies are set wrong in package.json. I've never had a problem installing webpack and webpack-dev-server (in that order).

I wouldn't waste too much time on it, after you figure it out once you'll move on to using a boilerplate that you or someone else wrote that fits your needs and Just Works.
Are you asking me? Well this is my package.json which is from the tutorial, only slightly changed with the start script and inclusion of strip-loader
code:
{
  "name": "webpack-demo",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "webpack"
  },
  "keywords": [],
  "author": "Joe Eames",
  "license": "ISC",
  "devDependencies": {
    "babel-core": "^6.2.1",
    "babel-loader": "^6.2.0",
    "babel-preset-es2015": "^6.1.18",
    "jshint": "^2.8.0",
    "jshint-loader": "^0.8.3",
    "node-libs-browser": "^0.5.3",
    "strip-loader": "^0.1.2",
    "webpack": "^1.12.9"
  }
}

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Redmark posted:

The hardest part has actually been using the native terminal, which is absolute garbage. The second hardest part is the Webpack documentation, which is merely trash.

I've learned that documentation will always be trash because by the time someone writes out documentation, it's out of date.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
I'm still a big dumb idiot using Webpack when I should be using Gulp, but..
Isn't there a way I can get Webpack to look in a single folder for all js/ts/es6 files? Right now I have:
code:
...
module.exports = {
    context: path.resolve('js'),
	entry: {
		foo: './foo.js',
		bar: './bar.js',
		baz: './baz.js',
		...
	},
	output: {
		path: 'builds/js/',
		filename: "[name]-gz.js"
	},
...
But I'd really rather not explicity include every file.
I tried replacing entry with:
code:
entry:  glob.sync("./"),
but then it either doesn't edit the js at all (wrong folder?) or complains that it can't find package.json because it looks in /js instead of root.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

ynohtna posted:

It's complaining about that due to your enclosing context telling it to look in resolved path 'js'.

(I'm the weirdo out on a limb who's been happily using jspm for the last year instead of the struggling with webpack, gulp and grunt.)
But why does it not look in that folder when the js files are explictly defined even thought the context is unchanged?

Depressing Box posted:

You need an object with a key for each file to output multiple entry points. I did something like this in an old project (so excuse the messy code):
I think this is kinda working but it's returning ./js\ instead of ./js/
code:
ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' ./js\foo.js in c:\working\path\here\js
does that for all the js files in that folder

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Helicity posted:

Dig into how Webpack works under the hood and it will be a bit more clear. It's a JS bundler, and everything else is a hack on top of that. If you treat it as your JS processor and handle everything else separately, your life will be easier. I had SASS compilation working as simple Hello World type thing, but never could get it working well in real-world cases, so chalked it up as another "just because someone made it work, doesn't mean it should work".

Webpack 2 will (supposedly) have decent documentation this time, and will have tree-shaking as its killer feature. I'm guessing it will be the favored JS bundler for the next year or so, as nothing seems ready to overthrow it yet.
Webpack 2 documentation is out.

I didn't know it was either until a co-worker was researching Webpack to help me with my issue I posted here earlier. We did get that issue resolved, just had to edit the values in glob.sync(path.join(__dirname, 'js/*.js'))

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

The Wizard of Poz posted:

Cross-posting here:

I figure there's probably no easy answer to this, but is there a reliable way to detect mobile devices? I want to enable the native <input type="date"> date pickers for mobile devices and tablets (because they are actually not terrible) but not for desktop (because they are actually terrible).

What do you want to do instead?

You might be better off detecting the <input type="date"> feature with modernizr .

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
Anyone know why my SASS colors are compiling to different values now?
It usued to be what shows on http://www.sassmeister.com/ but now colors using mix() are slightly different.
I notice the website shows 3.4.21, the most recent version is 3.4.22 but somehow I have 3.4.23??

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Munkeymon posted:

Using an actual type="date" to enter a birthday is currently a bad idea because the Android date control only lets you jog one month at a time, defaults to the current date and is really easy to set to the current date (accidentally press any of the green part at the top of the overlay in the image below!), so any adult is going to have to tap a stupid button 200+ times to get anywhere near their birthday.



You can tap the year to change it :science:

Adbot
ADBOT LOVES YOU

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!
gently caress this field.
I have to relean everything I learned about Webpack, which wasn't much, becuase of Webpack 2.
So now I'm trying to do the most basic of things, but of course, tutorials are either "hello world" or "here's a giant multi-page website using 17 other technologies". All I want is it to compiles SASS, which of course it's ignoring. I was following this, until I actually tried to follow it. webpack --watch works, but when I try npm run build it has a bunch of errors*. Why? because gently caress me, I guess? I'm sure by the time I figure out where I went wrong in literally copy/pasting a tutorial Webapack 3 4 17 will be out, and web dev will 100% be archaic terminal commands you just have to ~know~.

To be fair, the tutorial is 4 days old, so I'm sure it's completely out of date and useless now.



*
code:
ERROR in bundle.js from UglifyJs
SyntaxError: Unexpected character '`' [bundle.js:74,17]

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\                                  node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.9.4
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! webpack2-demo@1.0.0 build: `webpack -p`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the webpack2-demo@1.0.0 build script 'webpack -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the webpack2-demo package                                  ,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     webpack -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs webpack2-demo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls webpack2-demo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply