Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for scss versioning #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/public/main.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import 'file-loader?name=fonts/[name].[ext]!./fonts/bb-icons.svg';
// images
import './images/bb-logo.svg';

// styles
import './main.scss';

// chosen angular translations
import 'file-loader?name=angular-i18n/[name].[ext]!bookingbug-angular/node_modules/angular-i18n/angular-locale_en.js';
import 'file-loader?name=angular-i18n/[name].[ext]!bookingbug-angular/node_modules/angular-i18n/angular-locale_fr.js';
Expand All @@ -26,6 +23,15 @@ import config from './main.config';
import run from './main.run';
import versionModule from './version/version.module';

// Try to load a versioned scss file, otherwise load the default one
import BBUIVersionService from 'bookingbug-angular/src/public-booking/-versioning/ui_version.service';
try {
require('./main_v' + BBUIVersionService.getUIVersion() + '.scss');
} catch (ex) {
require('./main.scss');
}


export default angular
.module('public', [
bbPublicBookingModule,
Expand Down
1 change: 1 addition & 0 deletions src/public/main_v2.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "~bookingbug-angular/src/public-booking/main_v2.scss";