Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.
/ consume_transformer Public archive

A Barback transformer that removes files from the output of pub build and serve.

License

Notifications You must be signed in to change notification settings

Fox32/consume_transformer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

consume_transformer

A Barback transformer that removes files from the output of pub build and serve.

The transformer can be used to stop emitting output files that satisfy a filter from getting outputted by pub build or pub serve. This allows to emit a deployable version of your application, without source or sensitive files.

Configuration

The next step is the configuration the transformer for your package. Add it to the dependencies and transformers sections of your pubspec.yaml and add the desired filters. A filter is a regular expression that is matched against the full name of the assets. The following example removes all files that end with the file exentsion .psd.

dependencies:
- consume_transformer

transformers:
- consume_transformer:
    patterns: ["\\.psd$"]

You need to add the transformer to you pubspec.yaml file as the last transformer to catch all files created during all build stages.

License

The MIT License (MIT)

Copyright (c) 2015 Oliver Sand

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

About

A Barback transformer that removes files from the output of pub build and serve.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages