![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
$ npm install smush
Utility package to help smush css and js files. Currently supports jade
template language, but can easily be extended to support other formats.
Minified files are placed in options.target
dir, defaults to public/css/min
and public/js/min
for css and js files respectively.
The generated .jade
files are placed alongside the .tmpl
files.
Please check default options for search and replace patterns listed below or in the index.js
file. You just need to update the options to suit your needs.
var defaults = {
extension: '.tmpl',
jade: {
extension: '.jade',
comment: '//- This is a generated file. Make your changes to the .tmpl file instead.\n\n',
css: {
pattern: /link\(rel=\"stylesheet\", href=\"(.*)\.css\"/,
replacePattern: '<PLACEHOLDERFORMINIFIEDFILE>',
extension: '.css',
source: 'public',
target: 'public/css/min/'
},
js: {
pattern: /script\(src\=\"(.*)\.js\"/,
replacePattern: '<PLACEHOLDERFORMINIFIEDFILE>',
extension: '.js',
source: 'public',
target: 'public/js/min/'
}
}
};
Use smush.css(options, callback)
to smush css files. template
is a required field that species the .tmpl
file to smush.
Example
var smush = require('smush');
smush.css({
template: 'test/sample/css/styles',
pattern: /link\(rel=\"stylesheet\",href=\"(.*)\.css\"/,
source: 'test/sample/',
target: 'test/sample/min/'
}, callback);
Use smush.js(options, callback)
to smush javascript files. template
is a required field that species the .tmpl
file to smush.
Example
smush.js({
template: 'test/sample/js/scripts',
pattern: /script\(src\=\'(.*)\.js\'/,
source: 'test/sample/',
target: 'test/sample/min/'
}, callback);
Run npm test
or node path/to/smush/index.js
to verify if minify is working. Please check files under test
dir for a sample implementation.
FAQs
Utility package to smush css and js files
The npm package smush receives a total of 1 weekly downloads. As such, smush popularity was classified as not popular.
We found that smush demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.