Hi Folks, This is a copy paste version of one of the blogs which helped me.Giving due to credit to him.Just wanted a copy of the same with some minor updates.Below is the link for reference http://abdelraoof.com/blog/2014/11/11/install-nodejs-without-admin-rights/ Step 1: Get Node.exe First you will need to download the Windows Binary. You can get it from Node.js download page or http://nodejs.org/dist/latest/ . For x64, you will have to download from the appropriate folder. Move the executable to a local folder. Step 2: Get NPM NPM (Node Package Manager) is the package manager for Node.js and you will need this for your development. You can download NPM from https://github.com/npm/npm/releases and extract the zip file to a local folder. Step 3: Copy the extracted files in a folder Copy npm.cmd from extracted folder \npm\bin to the folder where node.exe resides Now move the extracted npm files in a folder named "node_modules\npm" in the same folder
Make sure you have node and npm installed Directory Setup 1. npm run init 2. create public and src folder 3. Add index.html in public folder 4. Add index.tsx in src folder Add Dependencies npm install react react-dom Add Dev Dependencies npm install typescript webpack webpack-cli webpack-dev-server ts-loader html-webpack-plugin --save-dev npm i --save-dev @types/react-dom typed-scss-modules Add Configuration and Code Add code to src\index.tsx https://github.com/sagarpandey88/templates/blob/main/typescript-react/src/index.tsx Add webpack.config.js https://github.com/sagarpandey88/templates/blob/main/typescript-react/webpack.config.js Add tsconfig.json https://github.com/sagarpandey88/templates/blob/main/typescript-react/tsconfig.json Run the code npm run build npm run start
Hi All, I came across an issue in JavaScript where i was not able to replace all the occurrences of a string in another string. A simple string.replace would only replace the first occurence. str.replace("hello", 'hi'); We can make a small tweak in the existing code and make it work.Below is an example. str.replace(new RegExp('hello', 'g'), 'hi');
Comments
Post a Comment