Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I got a problem with Clojure. I don't program in Clojure or ClojureScript, but I need some Clojure to compile to JavaScript. I followed the Getting Started https://github.com/clojure/clojurescript/wiki/Windows-Setup (set all the .jar files up) and downloaded the git repo. But I don't really understand how to compile my "project".clj to JavaScript. Would be glad if anybody can help!
Once you've installed leiningen (there is a windows installer also )you have to cd into the project and then:
cd 'project-name'
lein cljsbuild once
And the clojurescript will be compiled follow the project.clj compilation configuration details. If these steps don't do the expected compile work, then you'd have to publish some extra details about your project.clj configuration
PS: Be sure to have installed leininguen version 2+ . (On the terminal: lein -version)
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am working on a React.js project with only .js documents using visual studio Code.For a long time it was successfuly being developed with including JSX tags inside javascript files.There were no errors or problems.But at once,when I use npm run start,it shows many JSX tag errors as unsupported,without changing the code.I cleaned cache,Reinstalled node modules,Reinstalled VS code,Reinstalled NPM .Instead of VS code,I used Atom.But problem could not be solved.On other laptops,this project works well and other projects with .js files with JSX syntaxes performs well on my device.I tried an earlier github folder of this same project,but it is also not working.Below problem was shown on terminal when I run,npm run start.(There are lot of files on project which leads to this error)
Syntax error: C:/software project/my-app/src/App.js: Unexpected token (108:3)
To resume:
The problem is that a dependency as been changed.
https://github.com/ksandaru/voting_app/blob/2d6ad15ff2007061f66e5116600c16a690259397/package.json#L31 undo this line. and run npm install and npm run start
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I am totally new to React Js. So I start to making the demo. I had made one demo and it successfully runs on the browser. but when I run again that same demo than it gives me below error.
Looks like a version issue with some lib in your node_modules.
Try Deleting the node_modules folder.
Remove ^ symbol against all the version numbers in your package.json
Then run npm i
and lastly, run npm start
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I want to extend the npm run build command in my package.json not by replacing it, because it uses react-scripts build but by &&'ing another script.
Fastest way to achieve this would be a bash script which just does that. I want to copy a few other files from src into build in order to make a chrome extension out of it.
Is it considered bad practice to use a shell script here rather than writing it natively in a node environment?
Not exactly a bad practice and it is often done in practice but keep in mind that it will be less portable because it will not work on systems where the shell that you use for scripting (e.g. Bash or whatever is in the shebang line) is not available.
I recently wrote an answer to the question on how to solve a problem with installing Node modules that require Bash on Windows:
'bash' is not recognized as an internal or external command
So it is a problem that happens in practice.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have many CSS & JS files. Ideally, I just want to use some command line tool to select all those css & js files, and minify them into one file each. Any simple tools for this?
The npm respository offers many command line tools for this, for example:
https://www.npmjs.com/package/uglify-js
https://www.npmjs.com/package/uglifycss
Just install them with "npm install -g [package-name]", after installing Node.js - which comes with npm.
You're looking for yuicompressor? It minifies and combines multiple CSS files (or JS files) and concatenates them to one single file.
Example:
yuicompressor *.js > javascript.min.js
You can use gulp to do this.
Take a look at this tutorial for some simple examples, including css and js minification :
http://julienrenaux.fr/2014/05/25/introduction-to-gulp-js-with-practical-examples/
Of note is the js example, which demonstrates minifiying an entire directory - you can do the same with css as well.
You will have to create one small config file unless you use the gulp-shell node package. I probably wouldn't bother with that when first learning gulp.
There are a few "set up gulp" tutorials, including this one: http://travismaynard.com/writing/getting-started-with-gulp.
A build tool like gulp or grunt are made to do this, plus you can do a lot more once you're familiar with one of them.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have 18 CSS files and 20 JS files. After running in Chrome's Console Aufits-->Remove unused CSS rules. I can see some files have 93% of unused code. Something similar happens to the JS files. My website is only one html file and has no nested html files.
The ideal solution to my needs would be a software that scans my website and generates a single CSS file and a single JS file and only with the used code. If this tool does not exist, i can continue living with all the files but i need a tool to delete de unused code and leave just the used one.
Is there such a software?
yes, you can! use uncss that's a pretty nice tool, you'll need to install node.js, grunt, bower, git and install it by using npm.
then you just need to do a npm install -g uncss
that apply with any technology you can just use the dev node.js environment which is awesome!