mananshah99 / atom-minjs Goto Github PK
View Code? Open in Web Editor NEWMinifies a JS file on save in Atom.
Home Page: https://atom.io/packages/atom-minjs
License: MIT License
Minifies a JS file on save in Atom.
Home Page: https://atom.io/packages/atom-minjs
License: MIT License
Use activationCommands
instead of activationEvents
in your package.json
Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:187:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:179:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:372:14)
[Enter steps to reproduce below:]
Atom Version: 0.209.0
System: Microsoft Windows 8.1 Pro
Thrown From: atom-minjs package, v0.2.12
Failed to activate the atom-minjs package
At Cannot read property 'command' of undefined
TypeError: Cannot read property 'command' of undefined
at Object.module.exports.activate (C:\Users\inacent\.atom\packages\atom-minjs\lib\minjs.coffee:26:21)
at Package.module.exports.Package.activateNow (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\src\package.js:240:19)
at C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\src\package.js:772:25
at Emitter.module.exports.Emitter.emit (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\src\command-registry.js:219:20)
at C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\src\command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:520:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:355:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (C:\Users\inacent\AppData\Local\atom\app-0.209.0\resources\app.asar\src\window-event-handler.js:177:20)
-0:14.2.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
2x -0:13.6.0 core:move-up (atom-text-editor.editor.is-focused)
-0:12.5.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
10x -0:12.3.0 core:move-left (atom-text-editor.editor.is-focused)
3x -0:10.6.0 core:move-up (atom-text-editor.editor.is-focused)
-0:09.9.0 editor:move-to-first-character-of-line (atom-text-editor.editor.is-focused)
2x -0:09.5.0 core:move-right (atom-text-editor.editor.is-focused)
-0:09.1.0 core:delete (atom-text-editor.editor.is-focused)
-0:08.8.0 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)
2x -0:08.7.0 core:move-left (atom-text-editor.editor.is-focused)
-0:08.2.0 core:delete (atom-text-editor.editor.is-focused)
15x -0:08.0 core:move-left (atom-text-editor.editor.is-focused)
-0:06.5.0 core:delete (atom-text-editor.editor.is-focused)
3x -0:06.3.0 core:move-right (atom-text-editor.editor.is-focused)
-0:05.5.0 core:delete (atom-text-editor.editor.is-focused)
-0:03.6.0 core:save (atom-text-editor.editor.is-focused)
{
"core": {
"audioBeep": false
}
}
# User
atom-minjs, v0.2.12
jsformat, v0.9.0
linter, v0.12.7
linter-bootlint, v0.0.6
linter-csslint, v0.0.13
linter-jshint, v0.1.6
linter-php, v0.0.15
tabs-to-spaces, v0.11.0
# Dev
No dev packages
Hi,
I'm using it together with atom beautify that also beautifies on save and minds is not minifying on save.
Thanks
[Enter steps to reproduce below:]
Atom Version: 1.2.0-beta0
System: Ubuntu 15.10
Thrown From: atom-minjs package, v0.2.12
Failed to load the atom-minjs package
At Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
at Function (native)
at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/node_modules/uglify-js/tools/node.js:22:1)
at Module._compile (module.js:434:26)
at Object.defineProperty.value [as .js] (/usr/share/atom-beta/resources/app.asar/src/compile-cache.js:190:21)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/lib/minjs.coffee:1:9)
at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/lib/minjs.coffee:1:1)
at Module._compile (module.js:434:26)
at Object.defineProperty.value [as .coffee] (/usr/share/atom-beta/resources/app.asar/src/compile-cache.js:190:21)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Package.module.exports.Package.requireMainModule (/usr/share/atom-beta/resources/app.asar/src/package.js:661:34)
at /usr/share/atom-beta/resources/app.asar/src/package.js:115:28
at Package.module.exports.Package.measure (/usr/share/atom-beta/resources/app.asar/src/package.js:92:15)
at Package.module.exports.Package.load (/usr/share/atom-beta/resources/app.asar/src/package.js:106:12)
at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom-beta/resources/app.asar/src/package-manager.js:434:14)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom-beta/resources/app.asar/src/package-manager.js:511:30)
at /usr/share/atom-beta/resources/app.asar/node_modules/settings-view/lib/package-manager.js:444:29
at exit (/usr/share/atom-beta/resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
at triggerExitCallback (/usr/share/atom-beta/resources/app.asar/src/buffered-process.js:213:47)
at /usr/share/atom-beta/resources/app.asar/src/buffered-process.js:220:18
at Socket.<anonymous> (/usr/share/atom-beta/resources/app.asar/src/buffered-process.js:98:18)
at emitOne (events.js:82:20)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)
4x -7:25.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-7:22.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
-3:15.3.0 core:save (atom-text-editor.editor.is-focused)
-1:13 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:35.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
-0:34.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
{
"core": {
"themes": [
"atom-dark-ui",
"monokai-flat"
],
"autoHideMenuBar": true
}
}
# User
atom-minjs, v0.2.12
docblockr, v0.7.3
editor-background, v1.2.13
jsformat, v0.9.0
minimap, v4.16.0
monokai-flat, v1.0.1
# Dev
No dev packages
[Enter steps to reproduce:]
Atom: 1.39.1 x64
Electron: 3.1.10
OS: MX 18.3
Thrown From: atom-minjs package 0.2.12
Failed to activate the atom-minjs package
At Cannot read property 'command' of undefined
TypeError: Cannot read property 'command' of undefined
at Object.activate (/packages/atom-minjs/lib/minjs.coffee:26:22)
at Package.activateNow (/usr/share/atom/resources/app/static/<embedded>:11:3419283)
at measure (/usr/share/atom/resources/app/static/<embedded>:11:3418695)
at Package.measure (/usr/share/atom/resources/app/static/<embedded>:11:3416305)
at activationPromise.activationPromise.Promise (/usr/share/atom/resources/app/static/<embedded>:11:3418555)
at new Promise (<anonymous>)
at Package.activate (/usr/share/atom/resources/app/static/<embedded>:11:3418498)
at PackageManager.activatePackage (/usr/share/atom/resources/app/static/<embedded>:11:381612)
at /usr/share/atom/resources/app/static/<embedded>:11:935623
at r (/usr/share/atom/resources/app/static/<embedded>:11:930229)
at n (/usr/share/atom/resources/app/static/<embedded>:14:1127206)
at t.bufferStream (/usr/share/atom/resources/app/static/<embedded>:14:1127360)
at Socket.e.on (/usr/share/atom/resources/app/static/<embedded>:14:1125962)
at Socket.emit (events.js:187:15)
at Pipe._handle.close [as _onclose] (net.js:596:12)
-9:54.4.0 window:toggle-menu-bar (input.hidden-input)
-9:40.8.0 whitespace:remove-trailing-whitespace (input.hidden-input)
-9:36.9.0 core:select-all (div.line)
-9:24 editor:toggle-soft-wrap (input.hidden-input)
-9:04.5.0 markdown-preview:toggle (input.hidden-input)
16x -7:40.1.0 core:backspace (input.hidden-input)
2x -2:37.5.0 core:paste (div.placeholder-text)
atom-minify-stand-alone 0.2.0
atom-minjs 0.2.12
html-uglifier 0.1.1
minify-j-s 2.0.0
website-minifier 1.4.0
In keymaps\minjs.cson: Use the atom-workspace
tag instead of the workspace
class.
The context menu CSON format has changed. Please see
https://atom.io/docs/api/latest/ContextMenuManager
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.