diff --git a/lib/skynexui_responsive_stylesheet.dart b/lib/skynexui_responsive_stylesheet.dart index 848135a..1cde1e3 100644 --- a/lib/skynexui_responsive_stylesheet.dart +++ b/lib/skynexui_responsive_stylesheet.dart @@ -1,5 +1,7 @@ library responsive_stylesheet; +export 'responsive/responsive.dart'; + /// A Calculator. class Calculator { /// Returns [value] plus 1. diff --git a/package.json b/package.json index 74af807..9ccf00e 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,9 @@ "clean": "flutter clean && yarn prebuild", "release": "semantic-release", "release:github_registry": "node ./scripts/publishToGHRegistry.js", - "release:flutter": "yarn clean && dart pub publish --force" + "release:flutter": "yarn clean && dart pub publish --force", + "bump:flutter": "node ./scripts/bumpFlutter.js", + "postversion": "yarn bump:flutter && git add ." }, "devDependencies": { "@babel/core": "7.16.0", diff --git a/scripts/bumpFlutter.js b/scripts/bumpFlutter.js new file mode 100644 index 0000000..0ccdcff --- /dev/null +++ b/scripts/bumpFlutter.js @@ -0,0 +1,15 @@ +const fs = require('fs'); +const pkg = require('../package.json'); + +console.log(`[Bump Flutter to: ${pkg.version}]`); + +const pubspecUpdated = fs + .readFileSync('./pubspec.yaml', { encoding: 'utf-8' }) + .split('\n') + .map((line) => { + if (line.startsWith('version')) return `version: ${pkg.version}`; + return line; + }) + .join('\n'); + +fs.writeFileSync('./pubspec.yaml', pubspecUpdated, { encoding: 'utf-8' });