Skip to content

Commit

Permalink
Prepares fork release under @dr.pogodin scope
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Nov 6, 2020
1 parent fe70bb2 commit f9d6291
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 25 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
defaults: &defaults
docker:
- image: circleci/node:lts

version: 2
jobs:
test:
<<: *defaults
steps:
- checkout
- restore_cache:
key: node-modules-{{ checksum "package-lock.json" }}
- run: npm install
- save_cache:
key: node-modules-{{ checksum "package-lock.json" }}
paths:
- node_modules
- run: npm run build
- run: npm test
- persist_to_workspace:
root: .
paths:
- build
release:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish --access public

workflows:
version: 2
build:
jobs:
- test:
filters:
tags:
only: /.*/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*/
requires:
- test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ npm-debug.log
node_modules/
lib/
yarn-error.log
/dr.pogodin-babel-plugin-transform-assets-*.tgz
/build
10 changes: 5 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
.babelrc
.eslintrc
test
circle.yml
.*
/dr.pogodin-babel-plugin-transform-assets-*.tgz
/node_modules
/src
/test
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Dr. Sergey Pogodin <doc@pogodin.studio> (https://dr.pogodin.studio) \
Copyright (c) 2015-2016 Jake Murzy

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# babel-plugin-transform-assets
# Babel Plugin Transform Assets

Transforms importing of asset files at compile time using Babel. This plugin removes the need to run your server code through [Webpack](https://github.com/webpack/webpack) module bundler when using loaders such as file-loader, url-loader and building <s>isomorphic</s> universal apps. Aids in creating a cleaner, maintainable build process at the cost of yet another [Babel](https://github.com/babel/babel) [plugin](https://babeljs.io/docs/plugins/).
_This is a fork of [`babel-plugin-transform-assets`](https://www.npmjs.com/package/babel-plugin-transform-assets) upgraded to be compatible with the latest Webpack's `file-loder`, and to use the latest versions of all dependencies. For migration just prefix the plugin name with `@dr.pogodin/` scopename in your `package.json` and Babel configs._

[![CircleCI](https://img.shields.io/circleci/project/jmurzy/babel-plugin-transform-assets.svg)](https://circleci.com/gh/jmurzy/babel-plugin-transform-assets)
[![npm version](https://img.shields.io/npm/v/babel-plugin-transform-assets.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-transform-assets)
[![npm](https://img.shields.io/npm/l/babel-plugin-transform-assets.svg)](https://github.com/jmurzy/babel-plugin-transform-assets/blob/master/LICENSE.md)
Transforms importing of asset files at compile time using Babel. This plugin removes the need to run your server code through [Webpack](https://github.com/webpack/webpack) module bundler when using loaders such as file-loader, url-loader and building <s>isomorphic</s> universal apps. Aids in creating a cleaner, maintainable build process at the cost of yet another [Babel](https://github.com/babel/babel) [plugin](https://babeljs.io/docs/plugins/).

## Example

Expand All @@ -18,15 +16,15 @@ will be transformed to
var file = 'file.txt?9LDjftP';
```

See the spec for [more examples](https://github.com/jmurzy/babel-plugin-transform-assets/blob/master/test/index.spec.js).
See the spec for [more examples](https://github.com/birdofpreyru/babel-plugin-transform-assets/blob/master/test/index.spec.js).

## Requirements
[Babel](https://github.com/babel/babel) v6 or higher.

## Installation

```sh
npm install -D babel-plugin-transform-assets
npm install -D @dr.pogodin/babel-plugin-transform-assets
```

## Usage
Expand All @@ -38,7 +36,7 @@ npm install -D babel-plugin-transform-assets
```json
{
"plugins": [
["transform-assets", {
["@dr.pogodin/transform-assets", {
"extensions": ["svg"],
"name": "[name].[ext]?[sha512:hash:base64:7]"
}]
Expand All @@ -51,7 +49,7 @@ npm install -D babel-plugin-transform-assets
```javascript
require('babel-core').transform('code', {
plugins: [
['transform-assets', {
['@dr.pogodin/transform-assets', {
extensions: ['svg'],
name: '[name].[ext]?[sha512:hash:base64:7]',
}]
Expand Down
3 changes: 0 additions & 3 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "babel-plugin-transform-assets",
"name": "@dr.pogodin/babel-plugin-transform-assets",
"version": "1.1.0",
"description": "Transforms importing of asset files at compile time using Babel",
"main": "lib/index.js",
"author": "Jake Murzy <jake@murzy>",
"author": "Dr. Sergey Pogodin <doc@pogodin.studio> (https://dr.pogodin.studio)",
"license": "MIT",
"homepage": "https://github.com/jmurzy/babel-plugin-transform-assets",
"homepage": "https://dr.pogodin.studio",
"keywords": [
"babel",
"webpack",
Expand All @@ -30,17 +30,17 @@
"node": ">=6.0.0"
},
"scripts": {
"clean": "rimraf lib",
"build": "npm run clean && node node_modules/.bin/babel src --out-dir lib",
"clean": "rimraf build",
"build": "npm run clean && node node_modules/.bin/babel src --out-dir build",
"lint": "node node_modules/.bin/eslint src test",
"test": "npm run lint && node node_modules/.bin/mocha --require @babel/register 'test/**/*.spec.js'"
},
"repository": {
"type": "git",
"url": "https://github.com/jmurzy/babel-plugin-transform-assets.git"
"url": "https://github.com/birdofpreyru/babel-plugin-transform-assets.git"
},
"bugs": {
"url": "https://github.com/jmurzy/babel-plugin-transform-assets/issues"
"url": "https://github.com/birdofpreyru/babel-plugin-transform-assets/issues"
},
"dependencies": {
"loader-utils": "^2.0.0"
Expand Down

0 comments on commit f9d6291

Please sign in to comment.