browserify

Keystone+React: 'import' and 'export' may appear only with 'sourceType: module'

送分小仙女□ 提交于 2020-01-17 03:58:26
问题 After updating the project dependencies I started facing the error. Browserify has problem parsing my JS code, which is written in ES6. Browserify seems to expect ES5. I don't understand, why the sourceType: module seems to be the issue here. Source: var babelify = require('babelify'); var browserify = require('browserify-middleware'); var keystone = require('keystone'); var importRoutes = keystone.importer(__dirname); // Setup Route Bindings exports = module.exports = function(app) { app.use

How to browserify a browserified module?

落花浮王杯 提交于 2020-01-16 03:48:06
问题 The title seems confusing but I'll give an example. Let's say I create a module that uses ES6 that runs in the browser, so I use browserify with babelify to build everything. Now I want to include that same module in a project that uses browserify, but does not uses Babel to compile ES6, so I need the compiled version. I tried to require the "browserified" module like this: // es5-project.js require('./compiled-module-with-browserify'); But when I run browserify es5-project.js I start to get

Requiring pickadate.js with Browserify

拜拜、爱过 提交于 2020-01-16 03:39:09
问题 I would like to use the responsive pickadate.js date picker in my Backbone.js application. I am using Browserify to manage modules and dependencies and wondering how to integrate pickadate. I started with a npm install pickadate which added the node module to my project. Then, in one of my views, I try this: var pickadate = require('pickadate'); this.$el.find('input[name=dateEntry]').pickadate(); The error is on the second line which throws this error: [Error] TypeError: 'undefined' is not a

using jquery plugin in browserify along with angular

蓝咒 提交于 2020-01-15 10:15:27
问题 I am trying to use a tooltip plugin called tipso. And I am using angular along with browserify as my dependency manager. I have everything working out for me except for this plugin. Every little thing is little harder in browserify but this one seems to be turning into a nightmare. I have followed the documentation of tipso which is pretty simple. But when I run the app, I keep getting an error message stating that Uncaught TypeError: $(...).tipso is not a function in the chrome console. This

nvm installed node and npm, symlink issue when installing local browserify

為{幸葍}努か 提交于 2020-01-15 08:33:20
问题 Today I have installed the latest version of node through nvm on Linux Mint (Ubuntu 13.10). Thanks to nvm, I now don't have to use the sudo command with npm - which has solved problems with a few packages. $ node -v v0.10.29 $ npm -v 1.4.14 However when entering this command: npm install browserify --save-dev I now get the following error: npm ERR! Error: EACCES, symlink '../browserify/bin/cmd.js' npm ERR! { [Error: EACCES, symlink '../browserify/bin/cmd.js'] errno: 3, code: 'EACCES', path: '

Find a good way to get a coverage report with karma?

我们两清 提交于 2020-01-14 06:29:12
问题 I'm using karma-coverage + browserify + angular. The result i get from coverage is that 100% of the files under test are covered which is not true. Any idea how to make this work? This is my file karma.conf.js : // Karma configuration module.exports = function (config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['browserify',

electron, after browserify, fs.existsSync is not a function

痞子三分冷 提交于 2020-01-12 06:23:52
问题 i read a lot about browserify and electron and the gui browser issue yet there is still a problem with browserify, saying "fs.existsSync is not a function", and "required is not defined" * The full story* i created simple gui with electron , there are the package.json file, the main.js and the index.html file + 3,4 html files, where there i want to create simple "load show save window" that work with require That feature worked in the index.html file yet doesn't work properly in the load.html

electron, after browserify, fs.existsSync is not a function

空扰寡人 提交于 2020-01-12 06:22:27
问题 i read a lot about browserify and electron and the gui browser issue yet there is still a problem with browserify, saying "fs.existsSync is not a function", and "required is not defined" * The full story* i created simple gui with electron , there are the package.json file, the main.js and the index.html file + 3,4 html files, where there i want to create simple "load show save window" that work with require That feature worked in the index.html file yet doesn't work properly in the load.html

What does it mean for Electron to combine Node.js and Chromium contexts?

≯℡__Kan透↙ 提交于 2020-01-12 06:12:46
问题 In a blog post the author mentions that Electron combines Node and Chromium into a "single context" which implies that we don't have to use Browserify to transform code. I understand that one implication of Electron is you can build cross-platform desktop apps using web technologies. I also understand the reason why we're able to write to the filesystem is because Electron has Node baked in. Also, the reason we're able to use HTML/CSS/JS/DevTools is because Chromium is baked in. However, I

React-router Uncaught TypeError: type.toUpperCase is not a function

99封情书 提交于 2020-01-07 06:55:17
问题 I'm using the latest version of react, react-router, gulp and browserify I got this in beowser console: Uncaught TypeError: type.toUpperCase is not a function my code in app.js: "use strict"; var React = require('react'); var Router = require('react-router'); var Header = require('./components/Header'); var Index = require('./components/Index'); var About = require('./components/About') var Route = Router.Route; var IndexRoute = Router.IndexRoute ; var App = React.createClass({ render: