mantrajs / mantrajs-atom-package Goto Github PK
View Code? Open in Web Editor NEWMantra JS - Package for Atom
License: MIT License
Mantra JS - Package for Atom
License: MIT License
Bummer
Throws error that it Cannot find module 'atom-utils'
Did the usual atom "fixes" throwing out the caches, reloading all packages, etc.
I feel like I had this problem with some other package, but I don't remember what was done to fix it. Anyone else run into this?
I get the following stack trace:
Error: Cannot find module 'atom-utils'
at Module._resolveFilename (module.js:336:15)
at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
at Object. (/Business/land-of-here/matrajs-atom-package/lib/mantrajs.coffee:2:21)
at Object. (/Business/land-of-here/matrajs-atom-package/lib/mantrajs.coffee:1:1)
at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
at Object.defineProperty.value as .coffee
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:722:27)
at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:173:16)
at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:802:25
at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:20)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1013:28)
at emitOne (events.js:77:13)
at EventEmitter.emit (events.js:169:7)
[Enter steps to reproduce below:]
Atom Version: 1.7.4
System: Mac OS X 10.11.5
Thrown From: mantrajs package, v0.4.4
Uncaught TypeError: Cannot read property 'expand' of undefined
At /Users/Nadeem/.atom/packages/mantrajs/lib/directoryHandler.coffee:87
TypeError: Cannot read property 'expand' of undefined
at Function.module.exports.DirectoryHandler.revealActiveFile (/Users/Nadeem/.atom/packages/mantrajs/lib/directoryHandler.coffee:87:15)
at HTMLLIElement.<anonymous> (/Users/Nadeem/.atom/packages/mantrajs/lib/mantra-pane-view.coffee:65:24)
at HTMLLIElement.jQuery.event.dispatch (/Users/Nadeem/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4681:9)
at HTMLLIElement.elemData.handle (/Users/Nadeem/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4359:28)
-1:06.2.0 application:add-project-folder (atom-text-editor.editor.is-focused)
-0:59.9.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-0:56.3.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
-0:56.3.0 core:cancel (atom-text-editor.editor.mini.is-focused)
3x -0:50.2.0 mantrajs:toggle (atom-text-editor.editor.is-focused)
{
"core": {
"disabledPackages": [
"spell-check"
],
"packagesWithKeymapsDisabled": [
"atom-lupa",
"tool-bar",
"sync-settings",
"atom-ternjs"
]
}
}
# User
Quick-JavaScript, v0.16.0
atom-bracket-highlight, v0.3.1
atom-ternjs, v0.14.1
autocomplete-modules, v1.4.1
docblockr, v0.7.3
emmet, v2.4.3
emmet-snippets-compatibility, v1.0.6
formatter, v2.12.3
formatter-jsbeautify, v1.0.2
highlight-column, v0.5.1
highlight-line, v0.11.1
language-babel, v2.24.1
lebab-convert, v0.9.0
linter, v1.11.4
linter-codeclimate, v0.1.2
linter-eslint, v7.2.2
linter-jscs, v4.0.2
mantrajs, v0.4.4
meteor-api, v2.20.0
opened-files, v0.3.6
react, v0.15.0
sync-settings, v0.7.2
tool-bar, v0.4.0
tool-bar-almighty, v0.6.1
underscorejs-snippets, v0.2.2
# Dev
No dev packages
Hi,
It appears that MantraJS-atom and Mantra-CLI are in disagreement about a few things.
index.js
, while mantra-cli creates main.js
in server and client folders.unable to resolve
type errors), whereas Mantra CLI creates and requires ./configs/contextThere might be other incongruencies.
Please advise on what we should do. :)
PS. Thanks for two awesome tools. My life has improved <3
When we create a new module, it's not listed on the dropdown menu.
First off: Thank you for all the effort thus far. I'm diving in to Atom, Meteor and Mantra all at once, and this package is a boon. :)
Description
When I click on a file in the module-specific pane, the file is opened twice in Atom. This doesn't happen in the project-wide pane (methods, pubs & library folders).
Expected
The file should only be opened once.
Detail
I did a bit of poking around in source and dev tools, and found that the click handler in DirectoryHandler.load() is firing twice. Stopping propagation at the end of that handler does the trick (from a UI perspective), but that feels like a sledgehammer where a scalpel is needed. I've run out of time to keep digging further, and I suspect you'd be able to discern the real issue about 500x faster than me. ;)
Platform: MacOS 10.10.5.
Atom Version: 1.5.3
Packages:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[Enter steps to reproduce below:]
Atom Version: 1.7.2
System: Mac OS X 10.10.4
Thrown From: mantrajs package, v0.3.0
Uncaught Error: EACCES: permission denied, mkdir '/atom:'
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/nodegit/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:39
Error: EACCES: permission denied, mkdir '/atom:'
at Error (native)
at Object.fs.mkdirSync (fs.js:842:18)
at mkdirsSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/nodegit/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:22:9)
at mkdirsSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/nodegit/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:27:16)
at mkdirsSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/nodegit/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:27:16)
at Object.mkdirsSync (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/nodegit/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:27:16)
at Function.module.exports.DirectoryHandler.checkCreateDirectory (/Users/myu/.atom/packages/mantrajs/lib/directoryHandler.coffee:145:10)
at new MantraPaneView (/Users/myu/.atom/packages/mantrajs/lib/mantra-pane-view.coffee:51:22)
at /Users/myu/.atom/packages/mantrajs/lib/mantra-view.coffee:62:29
at Array.map (native)
at MantraView.module.exports.MantraView.loadDirectories (/Users/myu/.atom/packages/mantrajs/lib/mantra-view.coffee:54:35)
at MantraView.module.exports.MantraView.show (/Users/myu/.atom/packages/mantrajs/lib/mantra-view.coffee:107:6)
at Object.module.exports.TreeViewGitModified.toggle (/Users/myu/.atom/packages/mantrajs/lib/mantrajs.coffee:72:23)
at atom-workspace.subscriptions.add.atom.commands.add.mantrajs:toggle (/Users/myu/.atom/packages/mantrajs/lib/mantrajs.coffee:34:83)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1100:28)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:314:25)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
3x -2:11.6.0 core:close (button.btn.btn-primary)
-1:56 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-1:50.1.0 tree-view:add-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
-1:43.8.0 application:add-project-folder (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
2x -1:20.9.0 mantrajs:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
{}
# User
mantrajs, v0.3.0
meteor-api, v2.20.0
minimap, v4.22.1
pigments, v0.26.0
vim-mode, v0.65.0
# Dev
No dev packages
With dc031bd I'm getting
Uncaught Error: Cannot find module '/Volumes/.../project/mantra.json'
mantra.json
being in your .gitignore and seems to be expected at templates/mantra.json
? Not sure how you're generating it?
Hello @tomitrescak ,
I was planning to reuse this package and adapt it to my architecture using the awesome YAML panes and templates definition feature. However, the UI is broken with the current atom version. It is returning the following error:
Uncaught (in promise) TypeError: _this.treeView.find is not a function
at mantra-view.coffee [sm]:130
I am not familiar with Atom structure but I assume it is related to the fact that '.tree-view-scroller' is no longer existing, the scroller being somehow handled by a scrollbar
pseudo element attached to the atom-panel-container
node.
By any chance, would you know how hard it would be to fix it, and/or help me do it? Or do you know of a similar package alternative?
By the way, I couldn't find any other Atom package allowing to generate files like yours. IMHO, the features of this package could be very appreciated as a generic code builder rather than a mantrajs branded package.
I opened a topic on this here.
Thanks
Uncaught TypeError: Cannot read property 'expand' of undefined
/home/rongky/.atom/packages/mantrajs/lib/directoryHandler.coffee:82
-- Hide Stack Trace
TypeError: Cannot read property 'expand' of undefined at Function.module.exports.DirectoryHandler.revealActiveFile (/home/rongky/.atom/packages/mantrajs/lib/directoryHandler.coffee:82:15)
at HTMLLIElement. (/home/rongky/.atom/packages/mantrajs/lib/directoryHandler.coffee:50:24)
at HTMLOListElement.jQuery.event.dispatch (/home/rongky/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4681:9)
at HTMLOListElement.elemData.handle (/home/rongky/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4359:28)
To reproduce:
Atom Version: 1.5.3
System: "Funtoo Linux
Thrown From: mantrajs package, v0.2.0
Failed to activate the mantrajs package
At Cannot find module 'CSON'
Error: Cannot find module 'CSON'
at Module._resolveFilename (module.js:336:15)
at Function.Module._resolveFilename (/usr/share/atom/resources/app.asar/src/module-cache.js:383:52)
at Function.Module._load (module.js:286:25)
at Module.require (module.js:365:17)
at require (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/configHandler.coffee:2:8)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/configHandler.coffee:1:1)
at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208: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 (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/mantra-view.coffee:6:10)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/mantra-view.coffee:1:1)
at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208: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 (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/mantrajs.coffee:3:14)
at Object.<anonymous> (/home/fermuch/.atom/packages/mantrajs/lib/mantrajs.coffee:1:1)
at Module._compile (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:103:30)
at Object.defineProperty.value [as .coffee] (/usr/share/atom/resources/app.asar/src/compile-cache.js:208: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 (/usr/share/atom/resources/app.asar/src/native-compile-cache.js:50:27)
at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app.asar/src/package.js:720:27)
at Package.module.exports.Package.activateNow (/usr/share/atom/resources/app.asar/src/package.js:172:16)
at /usr/share/atom/resources/app.asar/src/package.js:800:25
at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:20)
at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:536:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:359:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:97:36)
at HTMLDocument.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:3:61)
-0:00.8.0 mantrajs:toggle (atom-text-editor.editor.is-focused)
{
"core": {
"autoHideMenuBar": true,
"disabledPackages": [
"jshint",
"linter-flow"
],
"projectHome": "/home/fermuch/Documentos/Dev/Work",
"themes": [
"one-dark-ui",
"atom-material-syntax"
]
}
}
# User
atom-jasmine, v0.8.1
atom-material-syntax, v0.4.3
cson, v2.0.1
linter, v1.11.3
linter-eslint, v6.0.0
linter-js-yaml, v1.2.5
mantrajs, v0.2.0
minimap, v4.19.0
react, v0.14.1
tabs-to-spaces, v1.0.2
# Dev
No dev packages
Can you advice how can I add coffeescript templates for package?
Just a heads up, with Atom 1.5.3b3 I had to (?) both do Toggle first and add mantrajs/templates/app/client
and ../server
to get Init Mantra Project
to work with an empty git repo. Not sure if they weren't included in your package repo from being empty? There was an Uncaught TypeError: path must be a string
error before that.
Added them here with .gitkeep if you want a PR of either or both? Not sure if you plan to populate those folders with anything?
It would be cool if a sublime text plugin for this was created too.
Hi, I just tried updating and got this output from Atom's package manager:
ENOTEMPTY, rmdir '/Users/dm/.atom/packages/mantrajs/node_modules/event-kit/node_mod
ules/grim/node_modules/emissary/node_modules/es6-weak-map/node_modules/es5-ext/object'
Looks like a pretty deep dependency, anyone else encounter this?
Hi,
I think it's super existing to work on a blog post on this package. I am planning to do it on next week.
If you can write it that'd be awesome. If not, I can work on that too.
Either way, I'm pretty excited about this.
@tomitrescak what do you think?
Hi there,
chai-enzyme provides some more tools to test components,
should we add this to the tests as well? It needs a tiny bit of boiler, so it makes sense to generate it:
import chai from 'chai'
import chaiEnzyme from 'chai-enzyme'
chai.use(chaiEnzyme());
what do you think?
Hi @tomitrescak,
I think it'd be great if we can move this to mantrajs org.
What do you think?
I added you to the org (check your inbox for the invitation).
Hi! Thanks for maintaining the mantrajs package!
In Atom v1.12, we are going to upgrade CoffeeScript to the latest version. This upgrade entails one potentially breaking change to the language:
Changed strategy for the generation of internal compiler variable names. Note that this means that @example function parameters are no longer available as naked example variables within the function body.
We think your package may be affected by this upgrade, in the following places:
These findings are based on linting packages with coffeescope
. We could be wrong about some of them. When we release v1.12 beta, please test your package against it to make sure that it works. Let me know if you have any further questions; I will be happy to help!
@rolfnl her is the originally reported issue
When the index.js file is generated the reference to the routes should be
import routes from "./routes.jsx";
instead of
import routes from "./routes";
it causes an error in the main.js when trying to load the module
At one time, when creating a module, this deleted my existing modules.
May be need to have a look at it.
[Enter steps to reproduce below:]
Atom Version: 1.7.2
System: Mac OS X 10.10.4
Thrown From: mantrajs package, v0.3.0
Uncaught TypeError: Cannot read property 'expand' of undefined
At /Users/myu/.atom/packages/mantrajs/lib/directoryHandler.coffee:82
TypeError: Cannot read property 'expand' of undefined
at Function.module.exports.DirectoryHandler.revealActiveFile (/Users/myu/.atom/packages/mantrajs/lib/directoryHandler.coffee:82:15)
at HTMLLIElement.<anonymous> (/Users/myu/.atom/packages/mantrajs/lib/directoryHandler.coffee:50:24)
at HTMLOListElement.jQuery.event.dispatch (/Users/myu/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4681:9)
at HTMLOListElement.elemData.handle (/Users/myu/.atom/packages/mantrajs/node_modules/space-pen/vendor/jquery.js:4359:28)
-5:04.1.0 mantrajs:toggle (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
{}
# User
mantrajs, v0.3.0
meteor-api, v2.20.0
minimap, v4.22.1
pigments, v0.26.0
vim-mode, v0.65.0
# Dev
No dev packages
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.