Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@misk/common
Advanced tools
Readme
This package provides shared libraries, externals, and styles across Misk tab repos.
$ yarn add @misk/common
@misk/dev
, vendors.js
and styles.js
will automatically be included in the build of that repo.@misk/dev
, use the Manual Inclusion steps below.Using the common vendors libraries and styles. We use copy-webpack-plugin
to copy the compiled vendor.js
and styles.js
files into build folder.
Install copy-webpack-plugin
npm i -D copy-webpack-plugin
Add the following to your webpack.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin');
...
module.exports = {
mode
entry
...
plugins: [
new CopyWebpackPlugin(
[{ from: './node_modules/@misk/common/lib' }],
{ debug: 'info', copyUnmodified: true }
)
],
}
Add the following to your index.html
to import styles.css
, vendors.js
, and common.js
<body>
<!-- Misk Common Libraries -->
<link rel="stylesheet" type="text/css" href="/@misk/common/styles.css" />
<script type="text/javascript" src="/@misk/common/vendors.js" preload />
<script type="text/javascript" src="/@misk/common/common.js" preload />
<!-- Other JS -->
</body>
From package.json
:
@blueprintjs/core
@blueprintjs/icons
axios
connected-react-router
dayjs
history
immutable
react
react-dom
react-helmet
react-hot-loader
react-redux
react-router
react-router-dom
react-router-redux
react-transition-group
redux
redux-saga
skeleton-css
styled-components
import '../node_modules/@blueprintjs/core/lib/css/blueprint.css'
import '../node_modules/normalize.css/normalize.css'
import '../node_modules/skeleton-css/css/skeleton.css'
import './styles/misk-common.css'
#Adding a new package
yarn add {package}
to add the package to package.json
vendorExternals
in @misk/dev/externals.js
src/vendors.js
README.md
with a copy of the updated package.json
list of packages#Adding a Cached Remote Asset
vendors.js
or styles.js
package.json
under the metadata key "miskCachedUrls"
with the format as follows
"miskCachedUrls": {
"taskname": {
"filepath": "font.css",
"url": "https://url.com/fonts/font.css"
},
"taskname2": {...}
}
taskname
: string description of the remote assetfilepath
: filepath within @misk/common/cachedUrls/
to which the url will be downloadedurl
: valid url that within a browser downloads or presents the desired fileyarn run refresh
initiates the download of all declared "miskCachedUrls"
using code in ./refreshCachedUrls.js
webpack.config.js
: Exports common variables and functionswebpack.static.config.js
: Exports common styles filewebpack.vendor.config.js
: Exports common vendors library fileFAQs
Misk-Web Common Libraries, Styles
We found that @misk/common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).