sparksuite / simplemde-markdown-editor

A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://simplemde.com
MIT License
9.86k stars 1.12k forks source link

release this without any npm dependencies #551

Open ChangePlaces opened 7 years ago

ChangePlaces commented 7 years ago

npm is the worse package manager and a complete and total pita. your project has dependencies, so document them, and let the user pull them down, and let them include them in their html. that way, the user doesn't need to **** around with npm, package.json, isn't tied to using npm and can code happily.

seeing require in javascript gives me the shivers and abstracts code in what could be a world of malicious injections.

nikocraft commented 7 years ago

can't you just use https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2/simplemde.min.js ?

ChangePlaces commented 7 years ago

for self-hosted code on a pi/linux server/* server, no. I never want to be limited to the only option of having to use cdn's. What if I want to edit it and develop it further and use that instead?

stevebauman commented 7 years ago

@ChangePlaces Why don't you download it?

Unfortunately for you, npm is the defacto standard in publishing javascript packages, just like PHP's composer, ASP's nuget, Ruby's gems, and Pythons PyPi.

You're in the extreme minority here, so you'll have to download your assets manually and include them like always.

ChangePlaces commented 7 years ago

@stevebauman,

How would I download and then develop/extend/edit a .min.js file?

I have to manually include dependencies? Yes, of course, I know. Read my issue. They're not listed, nor documented. What if I want to use a better dependency? Oh yeah, I can't. So, until these basic problems are sorted, onto the next editor.

"Extreme minority"? Is that like, "Extreme sports"? How did you come to your conclusion? Your opinion which you attempt to state as a fact, or a survey where every developer was asked (I don't remember that one, so I'm guessing the former!)

stevebauman commented 7 years ago

How would I download and then develop/extend/edit a .min.js file?

They're not listed, nor documented. What if I want to use a better dependency? Oh yeah, I can't. So, until these basic problems are sorted, onto the next editor.

Here you go, all the dependencies:

https://github.com/NextStepWebs/simplemde-markdown-editor/blob/master/package.json#L23-L26

Here's the un-minified version of SimpleMDE:

https://github.com/NextStepWebs/simplemde-markdown-editor/blob/master/src/js/simplemde.js

Here's the un-minified version of CodeMirror:

https://github.com/codemirror/CodeMirror/tree/master/src

Here's the un-minified version of Marked:

https://github.com/chjj/marked/blob/master/lib/marked.js

Now download those files locally and run them through an ES6 compiler and you're all set 😉

Just takes some browsing.

"Extreme minority"? Is that like, "Extreme sports"? How did you come to your conclusion? Your opinion which you attempt to state as a fact, or a survey where every developer was asked (I don't remember that one, so I'm guessing the former!)

I guess I struck a nerve here? I'm sorry to say but package / dependency management is the future of all web development. If you don't believe that then you're stuck in the past.

ghost commented 6 years ago

@ChangePlaces Well, you're not a very nice person.

ChangePlaces commented 6 years ago

I love it when people know the future. Don't you @eshansingh? Maybe it's just arrogance on the part of the person who thinks they know the future, huh?