grinder_php_minify 4.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 51

Grinder-PHP-Minify

Runtime Release License Coverage Build

Grinder plug-in minifying PHP source code by removing comments and whitespace.

Documentation

Development

License

Grinder-PHP-Minify is distributed under the MIT License.

Changelog

Version 4.1.0

  • Updated the package dependencies.

Version 4.0.0

  • Breaking change: raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 3.5.0

  • Updated the package dependencies.

Version 3.4.0

  • Updated the package dependencies.

Version 3.3.0

  • Updated the package dependencies.

Version 3.2.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 3.1.0

  • Added an example code.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 3.0.0

  • Breaking change: starting to use and support the Dart 2 SDK.
  • Breaking change: raised the required PHP version.
  • Added a user guide based on MkDocs.
  • Using optional const and new.
  • Using PHP 7.1 features, like void functions.
  • Updated the package dependencies.

Version 2.0.0

  • Breaking change: changed the signature of the Minifier and Transformer constructors.
  • Breaking change: renamed the Minifier.processDirectory() method to compressDirectory.
  • Breaking change: renamed the Minifier.processFile() method to compressFile.
  • Breaking change: splitted the phpMinify() function into the compressDirectory(), compressFile() and compressFiles() functions.
  • Added the Minifier.compressFiles() method.
  • Added the TransformMode enumeration.

Version 1.0.1

  • Fixed a bug with relative file paths.

Version 1.0.0

  • Breaking change: changed the signature of most class constructors.
  • Breaking change: merged the compress() and compressFile() functions into the phpMinify() function.
  • Breaking change: raised the required Dart version.
  • Breaking change: removed the binary and mode properties from the Minifier class.
  • Breaking change: the Minifier.transformer property is now final.
  • Added a factory constructor to the Transformer class.
  • Added new unit tests.
  • Changed licensing for the MIT License.
  • Updated the package dependencies.

Version 0.2.0

  • Breaking change: renamed the main script to grinder_php_minify.dart.

Version 0.1.0

  • Initial release.

example/main.dart

import 'package:grinder/grinder.dart';
import 'package:grinder_php_minify/grinder_php_minify.dart' as php_minify;

@Task('Compresses the PHP scripts from a given directory')
Future<void> compressPhpDirectory() => php_minify.compressDirectory('path/to/src', 'path/to/out');

@Task('Compresses a given PHP script')
Future<void> compressPhpFile() => php_minify.compressFile('path/to/src.php', 'path/to/out.php');

@Task('Compresses a given set of PHP scripts')
Future<void> compressPhpFiles() {
  final sourceDir = getDir('path/to/src');
  final fileSet = FileSet.fromDir(sourceDir, pattern: '*.php', recurse: true);
  return php_minify.compressFiles(fileSet.files, 'path/to/out', base: sourceDir.path);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  grinder_php_minify: ^4.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:grinder_php_minify/grinder_php_minify.dart';
  
Version Uploaded Documentation Archive
4.1.0 Nov 29, 2018 Go to the documentation of grinder_php_minify 4.1.0 Download grinder_php_minify 4.1.0 archive
4.0.0 Nov 28, 2018 Go to the documentation of grinder_php_minify 4.0.0 Download grinder_php_minify 4.0.0 archive
3.5.0 Oct 14, 2018 Go to the documentation of grinder_php_minify 3.5.0 Download grinder_php_minify 3.5.0 archive
3.3.0 Aug 22, 2018 Go to the documentation of grinder_php_minify 3.3.0 Download grinder_php_minify 3.3.0 archive
3.2.0 Aug 15, 2018 Go to the documentation of grinder_php_minify 3.2.0 Download grinder_php_minify 3.2.0 archive
3.1.0 Jul 21, 2018 Go to the documentation of grinder_php_minify 3.1.0 Download grinder_php_minify 3.1.0 archive
3.0.0 Jul 5, 2018 Go to the documentation of grinder_php_minify 3.0.0 Download grinder_php_minify 3.0.0 archive
2.0.0 Nov 6, 2017 Go to the documentation of grinder_php_minify 2.0.0 Download grinder_php_minify 2.0.0 archive
1.0.1 Oct 9, 2017 Go to the documentation of grinder_php_minify 1.0.1 Download grinder_php_minify 1.0.1 archive
1.0.0 Oct 5, 2017 Go to the documentation of grinder_php_minify 1.0.0 Download grinder_php_minify 1.0.0 archive

All 12 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
3
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
51
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: other

Primary library: package:grinder_php_minify/grinder_php_minify.dart with components: io, isolate, mirrors.

Health suggestions

Format lib/src/fast_transformer.dart.

Run dartfmt to format lib/src/fast_transformer.dart.

Format lib/src/functions.dart.

Run dartfmt to format lib/src/functions.dart.

Format lib/src/minifier.dart.

Run dartfmt to format lib/src/minifier.dart.

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/safe_transformer.dart (Run dartfmt to format lib/src/safe_transformer.dart.)
  • lib/src/transform_mode.dart (Run dartfmt to format lib/src/transform_mode.dart.)
  • lib/src/transformer.dart (Run dartfmt to format lib/src/transformer.dart.)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
grinder ^0.8.3 0.8.3
http ^0.12.0 0.12.0
path ^1.6.2 1.6.2
where ^6.0.0 6.0.0
Transitive dependencies
args 1.5.1
async 2.0.8
build_cli_annotations 1.0.1
charcode 1.1.2
cli_util 0.1.3+2
collection 1.14.11
glob 1.1.7
http_parser 3.1.3
meta 1.1.6
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
Dev dependencies
build_runner ^1.1.2
build_test ^0.10.3
coverage ^0.12.3
coveralls ^5.0.0
test ^1.5.1